Skip to content

Commit 054a785

Browse files
committed
v0.54.0
2 parents a56bb94 + 0f60c36 commit 054a785

File tree

633 files changed

+8975
-9158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

633 files changed

+8975
-9158
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,7 @@ junit.xml
5050
*.xtendbin
5151
.gradle
5252
build/
53+
54+
\.idea/
55+
56+
*.iml
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip
1+
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

extras/org.erlide.jvmcheck/src/org/erlide/jvmcheck/JvmCheck.java

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -18,74 +18,73 @@
1818
import org.eclipse.ui.PlatformUI;
1919

2020
public class JvmCheck implements IStartup, JvmCheckConstants_Actual {
21-
21+
2222
public static String getJavaVersionProperty() {
2323
return System.getProperty("java.version");
2424
}
25-
25+
2626
public static int getJavaVersion() {
27-
String versionProperty = getJavaVersionProperty();
28-
String[] versionSegments = versionProperty.split("\\.");
29-
30-
if(versionSegments.length < 2) {
31-
return -1;
32-
}
33-
// v<9: 1.8...
34-
// v>9: 9.x...
35-
String javaVersionStr = versionSegments[0];
36-
try {
37-
int v = Integer.parseInt(javaVersionStr);
38-
if (v == 1) {
39-
javaVersionStr = versionSegments[1];
40-
return Integer.parseInt(javaVersionStr);
41-
}
42-
return v;
43-
} catch (NumberFormatException e) {
44-
return -1;
45-
}
46-
}
47-
48-
@Override
27+
final String versionProperty = JvmCheck.getJavaVersionProperty();
28+
final String[] versionSegments = versionProperty.split("\\.");
29+
30+
// v<9: 1.8...
31+
// v>9: 9.x...
32+
String javaVersionStr = versionSegments[0];
33+
try {
34+
final int v = Integer.parseInt(javaVersionStr);
35+
if (v == 1) {
36+
javaVersionStr = versionSegments[1];
37+
return Integer.parseInt(javaVersionStr);
38+
}
39+
return v;
40+
} catch (final NumberFormatException e) {
41+
return -1;
42+
}
43+
}
44+
45+
@Override
4946
public void earlyStartup() {
50-
final int javaVersion = getJavaVersion();
51-
52-
if(javaVersion >= REQUIRED_JAVA_VERSION)
47+
final int javaVersion = JvmCheck.getJavaVersion();
48+
49+
if (javaVersion >= JvmCheckConstants_Actual.REQUIRED_JAVA_VERSION) {
5350
return;
54-
55-
// Show error message to the user, because the platform just silently fails.
51+
}
52+
53+
// Show error message to the user, because the platform just silently fails.
5654
// See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=417336
57-
55+
5856
Display.getDefault().asyncExec(new Runnable() {
5957
@Override
6058
public void run() {
61-
Shell activeShell = getActiveWorkbenchShell();
62-
63-
String message = "Could not start " + FEATURE_NAME + " because Java version is: " + javaVersion
64-
+ "\nVersion " + REQUIRED_JAVA_VERSION + " is required";
65-
59+
final Shell activeShell = JvmCheck.getActiveWorkbenchShell();
60+
61+
final String message = "Could not start " + JvmCheckConstants_Actual.FEATURE_NAME
62+
+ " because Java version is: " + javaVersion + "\nVersion "
63+
+ JvmCheckConstants_Actual.REQUIRED_JAVA_VERSION + " or later is required";
64+
6665
System.err.println(message);
67-
68-
if(activeShell == null) {
66+
67+
if (activeShell == null) {
6968
return;
7069
}
7170
MessageDialog.openError(activeShell, "Error", message);
7271
}
7372
});
74-
73+
7574
}
76-
75+
7776
/** Gets the active workbench window. */
7877
public static IWorkbenchWindow getActiveWorkbenchWindow() {
7978
return PlatformUI.getWorkbench().getActiveWorkbenchWindow();
8079
}
81-
80+
8281
/** Gets the active workbench shell. */
8382
public static Shell getActiveWorkbenchShell() {
84-
IWorkbenchWindow window = getActiveWorkbenchWindow();
85-
if(window != null) {
83+
final IWorkbenchWindow window = JvmCheck.getActiveWorkbenchWindow();
84+
if (window != null) {
8685
return window.getShell();
8786
}
8887
return null;
8988
}
90-
89+
9190
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
eclipse.preferences.version=1
22
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4-
org.eclipse.jdt.core.compiler.compliance=1.6
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
4+
org.eclipse.jdt.core.compiler.compliance=1.8
55
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
66
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7-
org.eclipse.jdt.core.compiler.source=1.6
7+
org.eclipse.jdt.core.compiler.source=1.8

extras/wrangler/plugins/org.erlide.wrangler.refactoring.codeinspection/src/org/erlide/wrangler/refactoring/codeinspection/CodeInspectionViewsManager.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ public class CodeInspectionViewsManager {
3636
public static final String GRAPH_VIEW = org.erlide.wrangler.refactoring.codeinspection.view.GraphImageView.VIEW_ID;
3737
public static final String CODE_INSPECTION_VIEW = org.erlide.wrangler.refactoring.codeinspection.view.CodeInspectionResultsView.VIEW_ID;
3838

39+
private CodeInspectionViewsManager() {
40+
}
41+
3942
/**
4043
* Shows the image in the graph view with the given title.
4144
*
@@ -48,9 +51,9 @@ public class CodeInspectionViewsManager {
4851
* @param dotFile
4952
* .dot file which is displayed
5053
*/
51-
static public void showDotImage(final Image img, final String title,
54+
public static void showDotImage(final Image img, final String title,
5255
final String secondaryID, final File dotFile) {
53-
final GraphImageView view = (GraphImageView) showView(GRAPH_VIEW, secondaryID);
56+
final GraphImageView view = (GraphImageView) CodeInspectionViewsManager.showView(CodeInspectionViewsManager.GRAPH_VIEW, secondaryID);
5457
view.setViewTitle(title);
5558
view.setImage(img);
5659
view.setDotFile(dotFile);
@@ -64,11 +67,11 @@ static public void showDotImage(final Image img, final String title,
6467
* @param e
6568
* Erlang elements
6669
*/
67-
static public void showErlElements(final String title, final ArrayList<IErlElement> e,
70+
public static void showErlElements(final String title, final ArrayList<IErlElement> e,
6871
final String secId) {
6972
try {
70-
final CodeInspectionResultsView v = (CodeInspectionResultsView) showView(
71-
CODE_INSPECTION_VIEW, secId);
73+
final CodeInspectionResultsView v = (CodeInspectionResultsView) CodeInspectionViewsManager.showView(
74+
CodeInspectionViewsManager.CODE_INSPECTION_VIEW, secId);
7275
v.addElements(e);
7376
v.setViewTitle(title);
7477
v.refresh();
@@ -85,7 +88,7 @@ static public void showErlElements(final String title, final ArrayList<IErlEleme
8588
*
8689
* @return view which is shown
8790
*/
88-
static public IViewPart showView(final String viewId) {
91+
public static IViewPart showView(final String viewId) {
8992

9093
final IWorkbench workbench = PlatformUI.getWorkbench();
9194

@@ -108,7 +111,7 @@ static public IViewPart showView(final String viewId) {
108111
* view secondary id, to handle multiple instances
109112
* @return view object
110113
*/
111-
static public IViewPart showView(final String viewId, final String secondaryID) {
114+
public static IViewPart showView(final String viewId, final String secondaryID) {
112115
final IWorkbench workbench = PlatformUI.getWorkbench();
113116

114117
final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
@@ -128,8 +131,8 @@ static public IViewPart showView(final String viewId, final String secondaryID)
128131
* @param viewId
129132
* view, which will be hidden
130133
*/
131-
static public void hideView(final String viewId) {
132-
hideView(viewId, null);
134+
public static void hideView(final String viewId) {
135+
CodeInspectionViewsManager.hideView(viewId, null);
133136
}
134137

135138
/**
@@ -140,7 +143,7 @@ static public void hideView(final String viewId) {
140143
* @param secondaryId
141144
* secondary id of a view instance
142145
*/
143-
static public void hideView(final String viewId, final String secondaryId) {
146+
public static void hideView(final String viewId, final String secondaryId) {
144147
final IWorkbench workbench = PlatformUI.getWorkbench();
145148

146149
final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();

extras/wrangler/plugins/org.erlide.wrangler.refactoring.codeinspection/src/org/erlide/wrangler/refactoring/codeinspection/GraphResultingInspectionHandler.java

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,37 +67,33 @@ public Object execute(final ExecutionEvent event) throws ExecutionException {
6767
final IErlSelection wranglerSelection = GlobalParameters
6868
.getWranglerSelection();
6969

70-
if (actionId.equals(
71-
"org.erlide.wrangler.refactoring.codeinspection.cyclicdependencies")) {
70+
if ("org.erlide.wrangler.refactoring.codeinspection.cyclicdependencies".equals(actionId)) {
7271
final Boolean answer = MessageDialog.openQuestion(
7372
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
7473
"Labels", "Label edges with function names called?");
75-
runInspection("Cyclic module dependency", CYCLYC_VIEW_ID,
74+
runInspection("Cyclic module dependency", GraphResultingInspectionHandler.CYCLYC_VIEW_ID,
7675
"There is no cyclic dependent modules in the project!", tmpFile,
7776
"cyclic_dependent_modules", "ssx", tmpFile.getAbsolutePath(),
7877
wranglerSelection.getSearchPath(), new OtpErlangBoolean(answer));
79-
} else if (actionId.equals(
80-
"org.erlide.wrangler.refactoring.codeinspection.generatefunctioncallgraph")) {
81-
runInspection("Function callgraph", FUNCTION_CALL_GRAPH_VIEW_ID,
78+
} else if ("org.erlide.wrangler.refactoring.codeinspection.generatefunctioncallgraph".equals(actionId)) {
79+
runInspection("Function callgraph", GraphResultingInspectionHandler.FUNCTION_CALL_GRAPH_VIEW_ID,
8280
"There is no dependent functions in the module!", tmpFile,
8381
"gen_function_callgraph", "sss", tmpFile.getAbsolutePath(),
8482
wranglerSelection.getFilePath(),
8583
wranglerSelection.getSearchPath());
8684

87-
} else if (actionId.equals(
88-
"org.erlide.wrangler.refactoring.codeinspection.generatemodulegraph")) {
85+
} else if ("org.erlide.wrangler.refactoring.codeinspection.generatemodulegraph".equals(actionId)) {
8986
final Boolean answer = MessageDialog.openQuestion(
9087
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
9188
"Labels", "Label edges with function names called?");
92-
runInspection("Module dependency graph", MODULE_GRAPH_VIEW_ID,
89+
runInspection("Module dependency graph", GraphResultingInspectionHandler.MODULE_GRAPH_VIEW_ID,
9390
"There is no dependent modules in the project!", tmpFile,
9491
"gen_module_graph", "ssx", tmpFile.getAbsolutePath(),
9592
wranglerSelection.getSearchPath(), new OtpErlangBoolean(answer));
9693

97-
} else if (actionId.equals(
98-
"org.erlide.wrangler.refactoring.codeinspection.improperdependecies")) {
94+
} else if ("org.erlide.wrangler.refactoring.codeinspection.improperdependecies".equals(actionId)) {
9995
runInspection("Improper module dependencies",
100-
IMPROPER_DEPENDECIES_VIEW_ID,
96+
GraphResultingInspectionHandler.IMPROPER_DEPENDECIES_VIEW_ID,
10197
"There is no improper module dependecies!", tmpFile,
10298
"improper_inter_module_calls", "ss", tmpFile.getAbsolutePath(),
10399
wranglerSelection.getSearchPath());

0 commit comments

Comments
 (0)