Skip to content

Commit 4e68a60

Browse files
author
jantje
committed
#1268 removed data for config change detection
As there is no longer a need to find out wether the enviironment variables ned to be updated this info is no longer used
1 parent 9b5a3dc commit 4e68a60

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

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

-49
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import org.eclipse.core.runtime.IPath;
1717
import org.eclipse.core.runtime.IStatus;
1818
import org.eclipse.core.runtime.Path;
19-
import org.eclipse.core.runtime.Platform;
2019
import org.eclipse.core.runtime.Status;
2120
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
2221
import org.eclipse.core.runtime.preferences.InstanceScope;
@@ -94,16 +93,6 @@ public class BoardDescription extends Common {
9493
private String myBoardID;
9594
private Map<String, String> myOptions;
9695

97-
/*
98-
* the following data is stored to detect changes that will make the equal fail
99-
* so os changes, workspace changes, eclipse install changes will force a update
100-
* on the stored data
101-
*/
102-
private String myProjectName = EMPTY;
103-
private String myOSName = Platform.getOS();
104-
private IPath myWorkSpaceLocation = Common.getWorkspaceRoot();
105-
private IPath myWorkEclipseLocation = ConfigurationPreferences.getEclipseHome();
106-
10796
/*
10897
* Stuff to make things work
10998
*/
@@ -162,18 +151,6 @@ public boolean needsRebuild(BoardDescription otherBoardDescriptor) {
162151
if (!this.getOptions().equals(otherBoardDescriptor.getOptions())) {
163152
return true;
164153
}
165-
if (!this.getProjectName().equals(otherBoardDescriptor.getProjectName())) {
166-
return true;
167-
}
168-
if (!this.myOSName.equals(otherBoardDescriptor.myOSName)) {
169-
return true;
170-
}
171-
if (!this.myWorkEclipseLocation.equals(otherBoardDescriptor.myWorkEclipseLocation)) {
172-
return true;
173-
}
174-
if (!this.myWorkSpaceLocation.equals(otherBoardDescriptor.myWorkSpaceLocation)) {
175-
return true;
176-
}
177154
return false;
178155
}
179156

@@ -353,13 +330,7 @@ public BoardDescription(ICConfigurationDescription confdesc) {
353330
myreferencingBoardsFile = new File(
354331
getBuildEnvironmentVariable(confdesc, ENV_KEY_JANTJE_BOARDS_FILE, EMPTY));
355332
myBoardID = getBuildEnvironmentVariable(confdesc, ENV_KEY_JANTJE_BOARD_ID, EMPTY);
356-
myProjectName = getBuildEnvironmentVariable(confdesc, ENV_KEY_JANTJE_PROJECT_NAME, EMPTY);
357333
myTxtFile = new BoardTxtFile(this.myreferencingBoardsFile);
358-
myOSName = getBuildEnvironmentVariable(confdesc, ENV_KEY_JANTJE_OS, EMPTY);
359-
myWorkSpaceLocation = new Path(
360-
getBuildEnvironmentVariable(confdesc, ENV_KEY_JANTJE_WORKSPACE_LOCATION, EMPTY));
361-
myWorkEclipseLocation = new Path(
362-
getBuildEnvironmentVariable(confdesc, ENV_KEY_JANTJE_ECLIPSE_LOCATION, EMPTY));
363334
String optinconcat = getBuildEnvironmentVariable(confdesc, ENV_KEY_JANTJE_MENU_SELECTION, EMPTY);
364335
myOptions = KeyValue.makeMap(optinconcat);
365336
}
@@ -427,7 +398,6 @@ protected BoardDescription(BoardDescription sourceBoardDescriptor) {
427398
this.myProgrammer = sourceBoardDescriptor.getProgrammer();
428399
this.myBoardID = sourceBoardDescriptor.getBoardID();
429400
this.myOptions = sourceBoardDescriptor.getOptions();
430-
this.myProjectName = sourceBoardDescriptor.getProjectName();
431401
this.myreferencingBoardsFile = sourceBoardDescriptor.getReferencingBoardsFile();
432402
this.myTxtFile = sourceBoardDescriptor.myTxtFile;
433403
this.myBoardsVariant = sourceBoardDescriptor.getBoardVariant();
@@ -642,11 +612,6 @@ public static String getUploadPort(IProject project) {
642612
}
643613

644614

645-
646-
public String getProjectName() {
647-
return this.myProjectName;
648-
}
649-
650615
/**
651616
* provide the actual path to the variant. Use this method if you want to know
652617
* where the variant is
@@ -900,10 +865,6 @@ public Map<String, String> getEnvVars() {
900865
allVars.put(ENV_KEY_JANTJE_ARCITECTURE_ID, getArchitecture());
901866
allVars.put(ENV_KEY_JANTJE_PACKAGE_ID, getPackage());
902867
allVars.put(ENV_KEY_JANTJE_UPLOAD_PORT, this.myUploadPort);
903-
allVars.put(ENV_KEY_JANTJE_PROJECT_NAME, myProjectName);
904-
allVars.put(ENV_KEY_JANTJE_OS, this.myOSName);
905-
allVars.put(ENV_KEY_JANTJE_WORKSPACE_LOCATION, this.myWorkSpaceLocation.toOSString());
906-
allVars.put(ENV_KEY_JANTJE_ECLIPSE_LOCATION, this.myWorkEclipseLocation.toOSString());
907868
allVars.put(JANTJE_ACTION_UPLOAD, this.myProgrammer);
908869

909870
allVars.put(ENV_KEY_SERIAL_PORT, getActualUploadPort());
@@ -1081,16 +1042,6 @@ private Map<String, String> getEnvVarsPostProcessing(Map<String, String> vars) {
10811042
}
10821043
}
10831044

1084-
// report that the upload comport is not set if default upload is used
1085-
String programmer = getProgrammer();
1086-
if (programmer.equalsIgnoreCase(Defaults.getDefaultUploadProtocol())) {
1087-
String MComPort = getUploadPort();
1088-
if (MComPort.isEmpty()) {
1089-
Common.log(new Status(IStatus.WARNING, Const.CORE_PLUGIN_ID,
1090-
"Upload will fail due to missing upload port for project: " + myProjectName)); //$NON-NLS-1$
1091-
}
1092-
}
1093-
10941045
ArrayList<String> objcopyCommand = new ArrayList<>();
10951046
for (Entry<String, String> curVariable : vars.entrySet()) {
10961047
String name = curVariable.getKey();

0 commit comments

Comments
 (0)