Skip to content

Commit

Permalink
[#496] - fix multi-arch projects
Browse files Browse the repository at this point in the history
  • Loading branch information
ilg-ul committed Oct 24, 2021
1 parent c57bac1 commit e86a819
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,8 @@ private boolean isThisPlugin() {
return true;
}

public static final String TYPE_PREFIX = "ilg.gnuarmeclipse.managedbuild.cross.target.";
public static final String TYPE_PREFIX_GNUARM = "ilg.gnuarmeclipse.managedbuild.cross.";
public static final String TYPE_PREFIX_GNUMCU = "ilg.gnumcueclipse.managedbuild.cross.";

private boolean isManaged() {

Expand All @@ -1109,11 +1110,16 @@ private boolean isManaged() {
IManagedProject managedProject = fConfig.getManagedProject();
IProjectType projectType = managedProject.getProjectType();

if (projectType == null || !projectType.getId().startsWith(TYPE_PREFIX)) {
return false;
if (projectType != null) {
String projectId = projectType.getId();
if (projectId.startsWith(TYPE_PREFIX_GNUARM)) {
return true;
} else if (projectId.startsWith(TYPE_PREFIX_GNUMCU)) {
return true;
}
}

return true;
return false;
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,8 @@ private boolean isThisPlugin() {
return true;
}

public static final String TYPE_PREFIX = "ilg.gnumcueclipse.managedbuild.cross.riscv.target.";
public static final String TYPE_PREFIX_GNUARM = "ilg.gnuarmeclipse.managedbuild.cross.";
public static final String TYPE_PREFIX_GNUMCU = "ilg.gnumcueclipse.managedbuild.cross.";

private boolean isManaged() {

Expand All @@ -1096,11 +1097,16 @@ private boolean isManaged() {
IManagedProject managedProject = fConfig.getManagedProject();
IProjectType projectType = managedProject.getProjectType();

if (projectType == null || !projectType.getId().startsWith(TYPE_PREFIX)) {
return false;
if (projectType != null) {
String projectId = projectType.getId();
if (projectId.startsWith(TYPE_PREFIX_GNUARM)) {
return true;
} else if (projectId.startsWith(TYPE_PREFIX_GNUMCU)) {
return true;
}
}

return true;
return false;
}

/*
Expand Down

0 comments on commit e86a819

Please sign in to comment.