Skip to content

Commit a4f3687

Browse files
Fix Checkstyle errors + New integration with the tooling core
This solves two issues thanks to the last tooling core upgrades. #38 Add JUnit tests for auto-completion #33 Add auto-completion for imports
1 parent 15753f2 commit a4f3687

20 files changed

Lines changed: 285 additions & 1167 deletions

plugins/net.roboconf.eclipse.modeler/src/net/roboconf/eclipse/modeler/RoboconfModelerPlugin.java

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -43,96 +43,96 @@
4343
*/
4444
public class RoboconfModelerPlugin extends AbstractUIPlugin {
4545

46-
// The plug-in ID
47-
public static final String PLUGIN_ID = "net.roboconf.eclipse.modeler";
46+
// The plug-in ID
47+
public static final String PLUGIN_ID = "net.roboconf.eclipse.modeler";
4848

49-
// The shared instance
50-
private static RoboconfModelerPlugin plugin;
51-
private Set<Viewpoint> viewpoints;
49+
// The shared instance
50+
private static RoboconfModelerPlugin plugin;
51+
private Set<Viewpoint> viewpoints;
5252

5353

54-
/**
55-
* Constructor.
56-
*/
57-
public RoboconfModelerPlugin() {
58-
// nothing
59-
}
54+
/**
55+
* Constructor.
56+
*/
57+
public RoboconfModelerPlugin() {
58+
// nothing
59+
}
6060

6161

62-
@Override
62+
@Override
6363
public void start(BundleContext context) throws Exception {
64-
super.start(context);
65-
plugin = this;
64+
super.start(context);
65+
plugin = this;
6666

67-
this.viewpoints = new HashSet<> ();
68-
this.viewpoints.addAll( ViewpointRegistry.getInstance().registerFromPlugin(
69-
PLUGIN_ID + "/description/graph.odesign" ));
70-
}
67+
this.viewpoints = new HashSet<> ();
68+
this.viewpoints.addAll( ViewpointRegistry.getInstance().registerFromPlugin(
69+
PLUGIN_ID + "/description/graph.odesign" ));
70+
}
7171

7272

73-
@Override
73+
@Override
7474
public void stop(BundleContext context) throws Exception {
7575

76-
plugin = null;
77-
if (this.viewpoints != null) {
78-
for (final Viewpoint viewpoint: this.viewpoints) {
79-
ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint);
80-
}
76+
plugin = null;
77+
if (this.viewpoints != null) {
78+
for (final Viewpoint viewpoint: this.viewpoints) {
79+
ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint);
80+
}
8181

82-
this.viewpoints.clear();
83-
this.viewpoints = null;
84-
}
82+
this.viewpoints.clear();
83+
this.viewpoints = null;
84+
}
8585

86-
super.stop(context);
87-
}
86+
super.stop(context);
87+
}
8888

8989

90-
/**
91-
* @return the shared instance
92-
*/
93-
public static RoboconfModelerPlugin getDefault() {
94-
return plugin;
95-
}
90+
/**
91+
* @return the shared instance
92+
*/
93+
public static RoboconfModelerPlugin getDefault() {
94+
return plugin;
95+
}
9696

9797

98-
/**
99-
* Logs an exception.
100-
* @param e the exception to log
101-
* @param severity the severity, given as one of the {@link IStatus} constants
102-
*/
103-
public static void log( Exception e, int severity ) {
98+
/**
99+
* Logs an exception.
100+
* @param e the exception to log
101+
* @param severity the severity, given as one of the {@link IStatus} constants
102+
*/
103+
public static void log( Exception e, int severity ) {
104104

105-
String msg = e.getMessage();
106-
if( msg == null || msg.trim().length() == 0 )
107-
msg = "An error occurred.";
105+
String msg = e.getMessage();
106+
if( msg == null || msg.trim().length() == 0 )
107+
msg = "An error occurred.";
108108

109-
IStatus status = new Status( severity, PLUGIN_ID, msg, e );
110-
getDefault().getLog().log( status );
111-
}
109+
IStatus status = new Status( severity, PLUGIN_ID, msg, e );
110+
getDefault().getLog().log( status );
111+
}
112112

113113

114-
/**
115-
* Logs a message.
116-
* @param message the message to log
117-
* @param severity the severity, given as one of the {@link IStatus} constants
118-
*/
119-
public static void log( String message, int severity ) {
120-
IStatus status = new Status( severity, PLUGIN_ID, message );
121-
getDefault().getLog().log( status );
122-
}
114+
/**
115+
* Logs a message.
116+
* @param message the message to log
117+
* @param severity the severity, given as one of the {@link IStatus} constants
118+
*/
119+
public static void log( String message, int severity ) {
120+
IStatus status = new Status( severity, PLUGIN_ID, message );
121+
getDefault().getLog().log( status );
122+
}
123123

124124

125-
public static Image findImage( String filePath ) {
125+
public static Image findImage( String filePath ) {
126126

127-
ImageDescriptor desc = imageDescriptorFromPlugin( PLUGIN_ID, filePath );
128-
Image img = null;
127+
ImageDescriptor desc = imageDescriptorFromPlugin( PLUGIN_ID, filePath );
128+
Image img = null;
129129
try {
130130
img = desc.createImage();
131131

132132
} catch( Exception e ) {
133133
log( "Image " + filePath + " could not be found.", IStatus.ERROR );
134134
}
135135

136-
return img;
137-
}
136+
return img;
137+
}
138138
}

plugins/net.roboconf.eclipse.plugin/src/net/roboconf/eclipse/plugin/RoboconfEclipseConstants.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,4 @@ public interface RoboconfEclipseConstants {
3434
String BUILDER_ID = "net.roboconf.eclipse.project.RoboconfBuilder"; //$NON-NLS-1$
3535
String MARKER_ID = "net.roboconf.eclipse.project.RoboconfMarker"; //$NON-NLS-1$
3636
String MARKER_ERROR_CODE = "net.roboconf.eclipse.plugin.marker.errorCode"; //$NON-NLS-1$
37-
String SRC_MAIN_MODEL = "src/main/model/"; //$NON-NLS-1$
3837
}

plugins/net.roboconf.eclipse.plugin/src/net/roboconf/eclipse/plugin/builder/RoboconfIncrementalBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ protected final void clean( IProgressMonitor monitor ) throws CoreException {
116116
*/
117117
private IFolder findApplicationRootLocation() {
118118
// FIXME: it can be under "target" too.
119-
return (IFolder) getProject().findMember( RoboconfEclipseConstants.SRC_MAIN_MODEL );
119+
return (IFolder) getProject().findMember( "src/main/model/" );
120120
}
121121

122122

plugins/net.roboconf.eclipse.plugin/src/net/roboconf/eclipse/plugin/editors/commons/actions/CorrectIndentationAction.java

Lines changed: 0 additions & 173 deletions
This file was deleted.

0 commit comments

Comments
 (0)