mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-10 17:55:39 +02:00
no need to go through default is get plugin id
This commit is contained in:
parent
d481a848f4
commit
707380391e
5 changed files with 10 additions and 10 deletions
|
@ -99,9 +99,9 @@ public class CDescriptor implements ICDescriptor {
|
||||||
IStatus status;
|
IStatus status;
|
||||||
readCDTProject(descriptionPath);
|
readCDTProject(descriptionPath);
|
||||||
if ( fOwner.getID().equals(id)) {
|
if ( fOwner.getID().equals(id)) {
|
||||||
status = new Status(IStatus.WARNING, CCorePlugin.getDefault().PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_EXISTS, "CDTProject already exisits", (Throwable)null);
|
status = new Status(IStatus.WARNING, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_EXISTS, "CDTProject already exisits", (Throwable)null);
|
||||||
} else {
|
} else {
|
||||||
status = new Status(IStatus.ERROR, CCorePlugin.getDefault().PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_MISMATCH, "CDTProject already exisits but does not match owner ID of creator", (Throwable)null);
|
status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_MISMATCH, "CDTProject already exisits but does not match owner ID of creator", (Throwable)null);
|
||||||
}
|
}
|
||||||
throw new CoreException(status);
|
throw new CoreException(status);
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ public class CDescriptor implements ICDescriptor {
|
||||||
IPath descriptionPath = projectLocation.append(DESCRIPTION_FILE_NAME);
|
IPath descriptionPath = projectLocation.append(DESCRIPTION_FILE_NAME);
|
||||||
|
|
||||||
if (!descriptionPath.toFile().exists()) {
|
if (!descriptionPath.toFile().exists()) {
|
||||||
IStatus status = new Status(IStatus.ERROR, CCorePlugin.getDefault().PLUGIN_ID, -1, "CDTProject file not found", (Throwable)null);
|
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, "CDTProject file not found", (Throwable)null);
|
||||||
throw new CoreException(status);
|
throw new CoreException(status);
|
||||||
}
|
}
|
||||||
readCDTProject(descriptionPath);
|
readCDTProject(descriptionPath);
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class CDescriptorManager implements IResourceChangeListener {
|
||||||
fDescriptorMap = new HashMap();
|
fDescriptorMap = new HashMap();
|
||||||
}
|
}
|
||||||
if ( fDescriptorMap.get(project) != null ) {
|
if ( fDescriptorMap.get(project) != null ) {
|
||||||
IStatus status = new Status(IStatus.ERROR, CCorePlugin.getDefault().PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_EXISTS, "CDTProject already configured", (Throwable)null);
|
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, CCorePlugin.STATUS_CDTPROJECT_EXISTS, "CDTProject already configured", (Throwable)null);
|
||||||
throw new CoreException(status);
|
throw new CoreException(status);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -27,7 +27,7 @@ public class COwner implements ICOwnerInfo {
|
||||||
if (extpoint != null) {
|
if (extpoint != null) {
|
||||||
extension = extpoint.getExtension(ownerID);
|
extension = extpoint.getExtension(ownerID);
|
||||||
} else {
|
} else {
|
||||||
IStatus status = new Status(IStatus.ERROR, CCorePlugin.getDefault().PLUGIN_ID, -1, "Invalid CDTProject owner ID", (Throwable)null);
|
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, "Invalid CDTProject owner ID", (Throwable)null);
|
||||||
throw new CoreException(status);
|
throw new CoreException(status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ public class COwner implements ICOwnerInfo {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IStatus status = new Status(IStatus.ERROR, CCorePlugin.getDefault().PLUGIN_ID, -1, "Invalid CDTProject owner extension", (Throwable)null);
|
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, "Invalid CDTProject owner extension", (Throwable)null);
|
||||||
throw new CoreException(status);
|
throw new CoreException(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ public class COwner implements ICOwnerInfo {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IStatus status = new Status(IStatus.ERROR, CCorePlugin.getDefault().PLUGIN_ID, -1, "Invalid CDTProject owner extension", (Throwable)null);
|
IStatus status = new Status(IStatus.ERROR, CCorePlugin.PLUGIN_ID, -1, "Invalid CDTProject owner extension", (Throwable)null);
|
||||||
throw new CoreException(status);
|
throw new CoreException(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class MakeBuilder extends AbstractCExtension implements ICBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getID() {
|
public String getID() {
|
||||||
return CCorePlugin.getDefault().PLUGIN_ID + ".makeBuilder";
|
return CCorePlugin.PLUGIN_ID + ".makeBuilder";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setOptimization(IOptimization o) {
|
public void setOptimization(IOptimization o) {
|
||||||
|
|
|
@ -12,13 +12,13 @@ import org.eclipse.cdt.core.ICOwner;
|
||||||
public class MakeProject implements ICOwner {
|
public class MakeProject implements ICOwner {
|
||||||
|
|
||||||
public void configure(ICDescriptor cproject) {
|
public void configure(ICDescriptor cproject) {
|
||||||
ICExtensionReference ext = cproject.create(CCorePlugin.BUILDER_MODEL_ID, CCorePlugin.getDefault().PLUGIN_ID + ".makeBuilder");
|
ICExtensionReference ext = cproject.create(CCorePlugin.BUILDER_MODEL_ID, CCorePlugin.PLUGIN_ID + ".makeBuilder");
|
||||||
ext.setExtensionData("command", "make");
|
ext.setExtensionData("command", "make");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void update(ICDescriptor cproject, String extensionID) {
|
public void update(ICDescriptor cproject, String extensionID) {
|
||||||
if ( extensionID.equals(CCorePlugin.BUILDER_MODEL_ID ) ) {
|
if ( extensionID.equals(CCorePlugin.BUILDER_MODEL_ID ) ) {
|
||||||
ICExtensionReference ext = cproject.create(CCorePlugin.BUILDER_MODEL_ID, CCorePlugin.getDefault().PLUGIN_ID + ".makeBuilder");
|
ICExtensionReference ext = cproject.create(CCorePlugin.BUILDER_MODEL_ID, CCorePlugin.PLUGIN_ID + ".makeBuilder");
|
||||||
ext.setExtensionData("command", "make");
|
ext.setExtensionData("command", "make");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue