Skip to content

Commit

Permalink
startup.bsh: do not add omnetpp as referenced project when importing …
Browse files Browse the repository at this point in the history
…projects into the IDE
  • Loading branch information
avarga committed Nov 24, 2024
1 parent 967b58c commit 9b0aeb7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions opp_env/templates/metadata/startup.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ void closeOtherProjects(ArrayList projectNames) {
}
}

String[] removeItems(String[] array, String prefix) {
List<String> l = new ArrayList<String>();
for (String s : array)
if (!s.startsWith(prefix))
l.add(s);
return l.toArray(new String[l.size()]);
}

void importAndOpenProjectsWithDependencies(String projectDepsEnv) {
collectedProjectNames = new ArrayList<String>();

Expand All @@ -58,6 +66,7 @@ void importAndOpenProjectsWithDependencies(String projectDepsEnv) {
String projectName = parts[0].trim();
String dependencies = parts.length > 1 ? parts[1].trim() : "";
String[] referencedProjectNames = dependencies.isEmpty() ? new String[0] : dependencies.split("[ ,]+");
referencedProjectNames = removeItems(referencedProjectNames, "omnetpp-");

// Collect the project name
collectedProjectNames.add(projectName);
Expand Down

0 comments on commit 9b0aeb7

Please sign in to comment.