Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorGuy Bonneau2015-03-06 01:14:49 +0000
committerGerrit Code Review @ Eclipse.org2016-02-01 14:51:05 +0000
commit8cfa1448ac4f59e81e1be6e84a6424527fade71f (patch)
tree186c8c6417234c38364ce8996baabe0d541b46f0 /build
parentebf041caef7192fb058873f18e5b188c458eaee2 (diff)
downloadorg.eclipse.cdt-8cfa1448ac4f59e81e1be6e84a6424527fade71f.tar.gz
org.eclipse.cdt-8cfa1448ac4f59e81e1be6e84a6424527fade71f.tar.xz
org.eclipse.cdt-8cfa1448ac4f59e81e1be6e84a6424527fade71f.zip
Bug 461545 Add support of attribute isDisplayable to the Build Property
of a tool and implement the new interface method. Change-Id: Iee645519c1bf9fbe144021bc81bd6cf7434c3e4b Signed-off-by: Guy Bonneau <guy.bonneau@videotron.ca>
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/pom.xml2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/schema/buildDefinitions.exsd21
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITool.java14
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java49
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java10
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java8
7 files changed, 95 insertions, 11 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF b/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF
index 30f7618aaa..bcf013e24a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF
+++ b/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.core; singleton:=true
-Bundle-Version: 8.3.0.qualifier
+Bundle-Version: 8.4.0.qualifier
Bundle-Activator: org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/build/org.eclipse.cdt.managedbuilder.core/pom.xml b/build/org.eclipse.cdt.managedbuilder.core/pom.xml
index 8d045f2a4e..227ca38b45 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/pom.xml
+++ b/build/org.eclipse.cdt.managedbuilder.core/pom.xml
@@ -11,7 +11,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>
- <version>8.3.0-SNAPSHOT</version>
+ <version>8.4.0-SNAPSHOT</version>
<artifactId>org.eclipse.cdt.managedbuilder.core</artifactId>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/build/org.eclipse.cdt.managedbuilder.core/schema/buildDefinitions.exsd b/build/org.eclipse.cdt.managedbuilder.core/schema/buildDefinitions.exsd
index 2cb51076d5..5a0b969d40 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/schema/buildDefinitions.exsd
+++ b/build/org.eclipse.cdt.managedbuilder.core/schema/buildDefinitions.exsd
@@ -810,6 +810,13 @@ The pathConverter of a toolchain applies for all tools of the toolchain except i
</documentation>
</annotation>
</attribute>
+ <attribute name="isHidden" type="boolean">
+ <annotation>
+ <documentation>
+ Specifies whether or not the tool is hidden within the setting tab of the user interface. This attribute should be set to true when a tool is internal to the toolchain and options cannot be changed by the user. Default value is false.
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
@@ -1618,12 +1625,14 @@ If no order is defined a default order is assumed, see &quot;org.eclipse.cdt.man
<attribute name="id" type="string" use="required">
<annotation>
<documentation>
+
</documentation>
</annotation>
</attribute>
<attribute name="name" type="string" use="required">
<annotation>
<documentation>
+
</documentation>
</annotation>
</attribute>
@@ -2576,28 +2585,28 @@ The only difference between this element and the resourceConfiguration is that r
<annotation>
<appInfo>
- <meta.section type="apiInfo"/>
+ <meta.section type="since"/>
</appInfo>
<documentation>
- [Enter API information here.]
+ This extension point was added in CDT 2.1
</documentation>
</annotation>
<annotation>
<appInfo>
- <meta.section type="since"/>
+ <meta.section type="examples"/>
</appInfo>
<documentation>
- This extension point was added in CDT 2.1
+ [Enter examples here.]
</documentation>
</annotation>
<annotation>
<appInfo>
- <meta.section type="examples"/>
+ <meta.section type="apiInfo"/>
</appInfo>
<documentation>
- [Enter examples here.]
+ [Enter API information here.]
</documentation>
</annotation>
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITool.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITool.java
index 41430dc0c1..18651eb0fe 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITool.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITool.java
@@ -47,6 +47,10 @@ public interface ITool extends IHoldsOptions {
public static final String WHITE_SPACE = " "; //$NON-NLS-1$
public static final String EMPTY_STRING = ""; //$NON-NLS-1$
public static final String IS_SYSTEM = "isSystem"; //$NON-NLS-1$
+ /**
+ * @since 8.4
+ */
+ public static final String IS_HIDDEN = "isHidden"; //$NON-NLS-1$
public static final String VERSIONS_SUPPORTED = "versionsSupported"; //$NON-NLS-1$
public static final String CONVERT_TO_ID = "convertToId"; //$NON-NLS-1$
@@ -697,5 +701,15 @@ public interface ITool extends IHoldsOptions {
boolean isSystemObject();
+ /**
+ * @since 8.4
+ */
+ boolean isHidden();
+
+ /**
+ * @since 8.4
+ */
+ void setHidden(boolean hidden);
+
String getUniqueRealName();
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
index f26cf99672..511b248e1f 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
@@ -155,6 +155,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
private IOptionPathConverter optionPathConverter = null ;
private SupportedProperties supportedProperties;
private Boolean supportsManagedBuild;
+ private Boolean isHidden;
private boolean isTest;
// Miscellaneous
private boolean isExtensionTool = false;
@@ -442,6 +443,9 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
if (tool.announcement != null) {
announcement = new String(tool.announcement);
}
+ if (tool.isHidden != null) {
+ isHidden = tool.isHidden;
+ }
supportsManagedBuild = tool.supportsManagedBuild;
@@ -579,6 +583,9 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
if (announcement == null) {
announcement = tool.announcement;
}
+ if (isHidden == null) {
+ isHidden = tool.isHidden;
+ }
if(supportsManagedBuild == null)
supportsManagedBuild = tool.supportsManagedBuild;
@@ -791,6 +798,12 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
if(tmp != null)
supportsManagedBuild = Boolean.valueOf(tmp);
+ // isHidden
+ String hidden = element.getAttribute(ITool.IS_HIDDEN);
+ if (hidden != null) {
+ isHidden = Boolean.valueOf(hidden);
+ }
+
scannerConfigDiscoveryProfileId = SafeStringInterner.safeIntern(element.getAttribute(IToolChain.SCANNER_CONFIG_PROFILE_ID));
tmp = element.getAttribute(IS_SYSTEM);
@@ -931,6 +944,14 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
if (element.getAttribute(ITool.ANNOUNCEMENT) != null) {
announcement = SafeStringInterner.safeIntern(element.getAttribute(ITool.ANNOUNCEMENT));
}
+
+ // Get the tool hidden setting
+ if (element.getAttribute(ITool.IS_HIDDEN) != null) {
+ String hidden = element.getAttribute(ITool.IS_HIDDEN);
+ if(hidden != null) {
+ isHidden = Boolean.valueOf(hidden);
+ }
+ }
// icon - was saved as URL in string form
if (element.getAttribute(IOptionCategory.ICON) != null) {
@@ -1084,6 +1105,11 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
if (announcement != null) {
element.setAttribute(ITool.ANNOUNCEMENT, announcement);
}
+
+ // hidden tool
+ if (isHidden != null) {
+ element.setAttribute(ITool.IS_HIDDEN, isHidden.toString());
+ }
// Serialize elements from my super class
super.serialize(element);
@@ -2528,6 +2554,15 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
setDirty(true);
}
}
+
+ @Override
+ public void setHidden(boolean hidden) {
+ if (isHidden == null || !(hidden == isHidden.booleanValue())) {
+ isHidden = hidden;
+ setDirty(true);
+ }
+ }
+
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.ITool#getCommandFlags()
@@ -3890,6 +3925,17 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
return ((IToolChain)bo).isSystemObject();
return false;
}
+
+ @Override
+ public boolean isHidden() {
+ if (isHidden == null) {
+ if (getSuperClass() != null) {
+ return getSuperClass().isHidden();
+ }
+ return false; // default is false
+ }
+ return isHidden.booleanValue();
+ }
@Override
public String getUniqueRealName() {
@@ -4032,6 +4078,9 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
if(announcement != null && !announcement.equals(superTool.getAnnouncement()))
return true;
+
+ if(isHidden != null && isHidden.booleanValue() != superTool.isHidden())
+ return true;
if(discoveredInfoMap != null && discoveredInfoMap.size() != 0)
return true;
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
index 45dba37b6e..0381f24a68 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
@@ -1222,6 +1222,16 @@ public class ToolReference implements IToolReference {
@Override
public void addOptionCategory(IOptionCategory category) {
}
+
+ @Override
+ public void setHidden(boolean hidden) {
+ }
+
+ @Override
+ public boolean isHidden() {
+ return false;
+ }
+
/*
* The following methods are added to allow the converter from ToolReference -> Tool
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java
index cdcfaa8fea..674daaad24 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/ToolListContentProvider.java
@@ -67,9 +67,11 @@ public class ToolListContentProvider implements ITreeContentProvider{
filteredTools = config.getFilteredTools();
// Create an element for each one
for (int i=0; i<filteredTools.length; i++) {
- ToolListElement e = new ToolListElement(filteredTools[i]);
- elementList.add(e);
- createChildElements(e,config);
+ if(!filteredTools[i].isHidden()) {
+ ToolListElement e = new ToolListElement(filteredTools[i]);
+ elementList.add(e);
+ createChildElements(e,config);
+ }
}
}
return elementList.toArray(new ToolListElement[elementList.size()]);

Back to the top