Skip to content

Commit ec20b80

Browse files
author
jan
committed
fix warnings
1 parent be9322d commit ec20b80

File tree

15 files changed

+30
-38
lines changed

15 files changed

+30
-38
lines changed

io.sloeber.autoBuild.ui/src/io/sloeber/autoBuild/ui/tabs/ToolSettingsTab.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public void controlResized(ControlEvent e) {
216216
} else {
217217
//the line below is only here for development so I know there will only be resources
218218
//TODO remove the line below after evaluation this never ever happens
219-
System.err.println("Element should be resource " + pageElement);
219+
System.err.println("Element should be resource " + pageElement); //$NON-NLS-1$
220220
}
221221

222222
setValues();
@@ -280,17 +280,6 @@ protected void updateTipText(String name, String tip) {
280280
tipText.update();
281281
}
282282

283-
/* (non-Javadoc)
284-
* Method resetTipText
285-
* @since 7.0
286-
*/
287-
private void resetTipText() {
288-
if (tipText == null) {
289-
return;
290-
}
291-
tipText.setText(Messages.ToolSettingsTab_0);
292-
tipText.update();
293-
}
294283

295284
/* (non-Javadoc)
296285
* Method displayOptionsForCategory
@@ -411,7 +400,7 @@ public void modifyText(ModifyEvent e) {
411400
}
412401
}
413402

414-
Label label = stringField.getLabelControl(mySettingsPageContainer);
403+
//Label label = stringField.getLabelControl(mySettingsPageContainer);
415404
Text text = stringField.getTextControl(mySettingsPageContainer);
416405
text.setText(optionValue);
417406
// if(pageHasToolTipBox)

io.sloeber.autoBuild/src/io/sloeber/autoBuild/buildTools/internal/MinGW32ToolsProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private void findTools() {
3636
try {
3737
myMinGWHome = org.eclipse.cdt.internal.core.MinGW.getMinGWHome();
3838
}
39-
catch(@SuppressWarnings("unused") Exception e) {
39+
catch( Exception e) {
4040
//ignore as this fails in maven build due to lack of gui and as such registry
4141
//is not available
4242
e.printStackTrace();

io.sloeber.autoBuild/src/io/sloeber/autoBuild/extensionPoint/providers/AutoBuildMakeRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ public String[] getRecipes(IFolder buildFolder, AutoBuildConfigurationDescriptio
296296
.getFolder(IPath.forPosix(curEntry.getValue())).getLocation();
297297
if(path==null) {
298298
//Log error to allow for investigation
299-
Activator.log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, "No location found for "+curEntry.getValue()));
299+
Activator.log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, "No location found for "+curEntry.getValue())); //$NON-NLS-1$
300300

301301
}else {
302302
includePath = includePath + WHITESPACE + DOUBLE_QUOTE + CMD_LINE_INCLUDE_FOLDER

io.sloeber.autoBuild/src/io/sloeber/autoBuild/helpers/api/KeyValueTree.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
import java.util.LinkedHashMap;
99
import java.util.Map;
1010
import java.util.Map.Entry;
11-
import java.util.TreeMap;
12-
1311
import org.apache.commons.io.FileUtils;
1412
import org.eclipse.core.resources.IFile;
1513
import org.eclipse.core.resources.IFolder;

io.sloeber.autoBuild/src/io/sloeber/autoBuild/integration/AutoBuildConfigurationDescription.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ public void deleteBuildFolder(IProgressMonitor monitor) {
11491149
curMember.delete(true, monitor);
11501150
} catch (CoreException e) {
11511151
Activator.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID,
1152-
"Failed to delete member "+curMember.getName(), e));
1152+
"Failed to delete member "+curMember.getName(), e)); //$NON-NLS-1$
11531153
}
11541154

11551155
}

io.sloeber.autoBuild/src/io/sloeber/autoBuild/integration/AutoBuildManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ public static Set<IProjectType> getProjectTypes(String extensionPointID, String
266266
IProjectType projectType = AutoBuildManager.getProjectType(extensionPointID, extensionID,
267267
element.getAttribute(ID), true);
268268
if (projectType == null) {
269-
System.err.println("project not found: extensionPoint ID " + extensionPointID + " and extension ID "
270-
+ extensionID + " and " + ID);
269+
System.err.println("project not found: extensionPoint ID " + extensionPointID + " and extension ID " //$NON-NLS-1$ //$NON-NLS-2$
270+
+ extensionID + " and " + ID); //$NON-NLS-1$
271271
} else {
272272
ret.add(projectType);
273273
}

io.sloeber.core/src/io/sloeber/core/Activator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private static void testKnownIssues() {
173173
if (!errorString.isEmpty()) {
174174
errorString += "\n\nSloeber might still function but if you get strange results you know where to look.\n";
175175
errorString += "Do not create an issue if you see this!!!";
176-
log(new Status(IStatus.ERROR, PLUGIN_ID, errorString));
176+
log(new Status(IStatus.ERROR, Activator.getId(), errorString));
177177
}
178178

179179
}
@@ -301,7 +301,7 @@ public void stop(BundleContext context) throws Exception {
301301
* the io.sloeber.core.managers and io.sloeber.core.managers.ui to work.
302302
*/
303303
public static String getId() {
304-
return PLUGIN_ID;
304+
return "io.sloeber.core";
305305
}
306306

307307
/**

io.sloeber.core/src/io/sloeber/core/api/Const.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class Const extends AutoBuildConstants {
7373
public static final String REMOTE_SUFFIX = "_remote";
7474

7575
// General stuff
76-
public static final String PLUGIN_ID = "io.sloeber.core";
76+
//public static final String PLUGIN_ID = "io.sloeber.core";
7777
public static final String CORE_PLUGIN_ID = "io.sloeber.arduino.core";
7878
public static final String SLOEBER_NATURE_ID = "io.sloeber.arduinonature";
7979
public static final String KEY_LAST_USED_EXAMPLES = "Last used Examples";

io.sloeber.core/src/io/sloeber/core/api/PasswordManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import org.eclipse.equinox.security.storage.SecurePreferencesFactory;
77
import org.eclipse.equinox.security.storage.StorageException;
88

9+
import io.sloeber.autoBuild.helpers.api.AutoBuildConstants;
910
import io.sloeber.core.Activator;
1011
import io.sloeber.core.Messages;
1112

@@ -113,7 +114,7 @@ public static void ErasePassword(String host) {
113114

114115
private static String ConvertHostToNodeName(String host) {
115116

116-
return "ssh/" + host.replace(Const.DOT, Const.SLACH); //$NON-NLS-1$
117+
return "ssh/" + host.replace(AutoBuildConstants.DOT, AutoBuildConstants.SLACH); //$NON-NLS-1$
117118
}
118119

119120
}

io.sloeber.core/src/io/sloeber/core/eclipseIntegrations/CDT_EnvironmentVariableResolver.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package io.sloeber.core.eclipseIntegrations;
22

3-
import static io.sloeber.core.api.Const.*;
4-
53
import org.eclipse.cdt.core.CCorePlugin;
64
import org.eclipse.cdt.core.envvar.IEnvironmentVariableManager;
75
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
@@ -18,6 +16,7 @@
1816
import org.eclipse.core.variables.IStringVariableManager;
1917
import org.eclipse.core.variables.VariablesPlugin;
2018

19+
import io.sloeber.core.Activator;
2120
import io.sloeber.core.Messages;
2221

2322
public class CDT_EnvironmentVariableResolver implements IDynamicVariableResolver {
@@ -29,7 +28,7 @@ public String resolveValue(IDynamicVariable variable, String varName) throws Cor
2928
return getBuildEnvironmentVariable(confDesc, varName);
3029

3130
} catch ( Exception e) {
32-
Status iStatus = new Status(IStatus.ERROR, PLUGIN_ID, Messages.projectNotFoundInGUI,e);
31+
Status iStatus = new Status(IStatus.ERROR, Activator.getId(), Messages.projectNotFoundInGUI,e);
3332
throw new CoreException(iStatus);
3433
}
3534
}

0 commit comments

Comments
 (0)