mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
@Override annotations and other cleanup
This commit is contained in:
parent
6fcb52fe97
commit
0b6b6c8b99
30 changed files with 537 additions and 438 deletions
|
@ -21,8 +21,8 @@ import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector2;
|
||||||
import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser;
|
import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser;
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil;
|
import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil;
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig2.SCProfileInstance;
|
import org.eclipse.cdt.make.internal.core.scannerconfig2.SCProfileInstance;
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfileManager;
|
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfile.BuildOutputProvider;
|
import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfile.BuildOutputProvider;
|
||||||
|
import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfileManager;
|
||||||
import org.eclipse.cdt.make.xlc.core.activator.Activator;
|
import org.eclipse.cdt.make.xlc.core.activator.Activator;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -108,6 +108,7 @@ public abstract class AbstractXLCBuildOutputParser implements IScannerInfoConsol
|
||||||
* org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser#processLine
|
* org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser#processLine
|
||||||
* (java.lang.String)
|
* (java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean processLine(String line) {
|
public boolean processLine(String line) {
|
||||||
boolean rc = false;
|
boolean rc = false;
|
||||||
int lineBreakPos = line.length() - 1;
|
int lineBreakPos = line.length() - 1;
|
||||||
|
@ -188,6 +189,7 @@ public abstract class AbstractXLCBuildOutputParser implements IScannerInfoConsol
|
||||||
* org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser#shutdown
|
* org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser#shutdown
|
||||||
* ()
|
* ()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void shutdown() {
|
public void shutdown() {
|
||||||
if (getUtility() != null) {
|
if (getUtility() != null) {
|
||||||
getUtility().reportProblems();
|
getUtility().reportProblems();
|
||||||
|
@ -365,6 +367,7 @@ public abstract class AbstractXLCBuildOutputParser implements IScannerInfoConsol
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void startup(IProject project, IPath workingDirectory, IScannerInfoCollector collector,
|
public void startup(IProject project, IPath workingDirectory, IScannerInfoCollector collector,
|
||||||
IMarkerGenerator markerGenerator) {
|
IMarkerGenerator markerGenerator) {
|
||||||
fProject = project;
|
fProject = project;
|
||||||
|
|
|
@ -52,7 +52,6 @@ import org.eclipse.cdt.make.internal.core.scannerconfig.ScannerConfigUtil;
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig.util.CCommandDSC;
|
import org.eclipse.cdt.make.internal.core.scannerconfig.util.CCommandDSC;
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig.util.CygpathTranslator;
|
import org.eclipse.cdt.make.internal.core.scannerconfig.util.CygpathTranslator;
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil;
|
import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil;
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig2.PerFileSICollector;
|
|
||||||
import org.eclipse.cdt.make.xlc.core.activator.Activator;
|
import org.eclipse.cdt.make.xlc.core.activator.Activator;
|
||||||
import org.eclipse.cdt.make.xlc.core.messages.Messages;
|
import org.eclipse.cdt.make.xlc.core.messages.Messages;
|
||||||
import org.eclipse.cdt.make.xlc.core.scannerconfig.util.XLCCommandDSC;
|
import org.eclipse.cdt.make.xlc.core.scannerconfig.util.XLCCommandDSC;
|
||||||
|
@ -268,6 +267,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Map<IResource, PathInfo> getPathInfoMap() {
|
public Map<IResource, PathInfo> getPathInfoMap() {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
IPerFileDiscoveredPathInfo2 info1 = getPerFileInfo1();
|
IPerFileDiscoveredPathInfo2 info1 = getPerFileInfo1();
|
||||||
|
@ -287,6 +287,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#getIncludeFiles(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#getIncludeFiles(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IPath[] getIncludeFiles(IPath path) {
|
public IPath[] getIncludeFiles(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
IPerFileDiscoveredPathInfo2 info1 = getPerFileInfo1();
|
IPerFileDiscoveredPathInfo2 info1 = getPerFileInfo1();
|
||||||
|
@ -308,6 +309,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath[] getIncludePaths(IPath path) {
|
public IPath[] getIncludePaths(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
|
|
||||||
|
@ -339,6 +341,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath[] getMacroFiles(IPath path) {
|
public IPath[] getMacroFiles(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
Set<IPath> pathSet = new HashSet<IPath>();
|
Set<IPath> pathSet = new HashSet<IPath>();
|
||||||
|
@ -360,6 +363,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath[] getQuoteIncludePaths(IPath path) {
|
public IPath[] getQuoteIncludePaths(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
|
|
||||||
|
@ -382,13 +386,14 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Map<String, String> getSymbols(IPath path) {
|
public Map<String, String> getSymbols(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
|
|
||||||
Map<String, String> symbols = new HashMap<String, String>();
|
Map<String, String> symbols = new HashMap<String, String>();
|
||||||
|
|
||||||
// add project level settings
|
// add project level settings
|
||||||
Map<String, String> projectSymbols = (Map<String, String>) fInfo1.getSymbols();
|
Map<String, String> projectSymbols = fInfo1.getSymbols();
|
||||||
for (String symbol : projectSymbols.keySet()) {
|
for (String symbol : projectSymbols.keySet()) {
|
||||||
symbols.put(symbol, projectSymbols.get(symbol));
|
symbols.put(symbol, projectSymbols.get(symbol));
|
||||||
}
|
}
|
||||||
|
@ -409,6 +414,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#isEmpty(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#isEmpty(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isEmpty(IPath path) {
|
public boolean isEmpty(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
boolean info1empty = false;
|
boolean info1empty = false;
|
||||||
|
@ -424,20 +430,24 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IPath[] getIncludePaths() {
|
public IPath[] getIncludePaths() {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
return fInfo1.getIncludePaths();
|
return fInfo1.getIncludePaths();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IProject getProject() {
|
public IProject getProject() {
|
||||||
return fInfo1.getProject();
|
return fInfo1.getProject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IDiscoveredScannerInfoSerializable getSerializable() {
|
public IDiscoveredScannerInfoSerializable getSerializable() {
|
||||||
return fInfo2.getSerializable();
|
return fInfo2.getSerializable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Map<String, String> getSymbols() {
|
public Map<String, String> getSymbols() {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
return fInfo1.getSymbols();
|
return fInfo1.getSymbols();
|
||||||
|
@ -455,7 +465,8 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo#getIncludeFiles(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo#getIncludeFiles(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
public IPath[] getIncludeFiles(IPath path) {
|
@Override
|
||||||
|
public IPath[] getIncludeFiles(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
|
|
||||||
Set<IPath> pathSet = new LinkedHashSet<IPath>();
|
Set<IPath> pathSet = new LinkedHashSet<IPath>();
|
||||||
|
@ -481,7 +492,8 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo#getIncludePaths()
|
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo#getIncludePaths()
|
||||||
*/
|
*/
|
||||||
public IPath[] getIncludePaths() {
|
@Override
|
||||||
|
public IPath[] getIncludePaths() {
|
||||||
final IPath[] includepaths;
|
final IPath[] includepaths;
|
||||||
final IPath[] quotepaths;
|
final IPath[] quotepaths;
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
|
@ -504,7 +516,8 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo#getIncludePaths(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo#getIncludePaths(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
public IPath[] getIncludePaths(IPath path) {
|
@Override
|
||||||
|
public IPath[] getIncludePaths(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
Set<IPath> pathSet = new LinkedHashSet<IPath>();
|
Set<IPath> pathSet = new LinkedHashSet<IPath>();
|
||||||
// get the command
|
// get the command
|
||||||
|
@ -529,7 +542,8 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#getMacroFiles(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#getMacroFiles(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
public IPath[] getMacroFiles(IPath path) {
|
@Override
|
||||||
|
public IPath[] getMacroFiles(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
Set<IPath> pathSet = new LinkedHashSet<IPath>();
|
Set<IPath> pathSet = new LinkedHashSet<IPath>();
|
||||||
// get the command
|
// get the command
|
||||||
|
@ -551,7 +565,8 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<IResource, PathInfo> getPathInfoMap() {
|
@Override
|
||||||
|
public Map<IResource, PathInfo> getPathInfoMap() {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
//TODO: do we need to cache this?
|
//TODO: do we need to cache this?
|
||||||
return calculatePathInfoMap();
|
return calculatePathInfoMap();
|
||||||
|
@ -561,14 +576,16 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo#getProject()
|
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo#getProject()
|
||||||
*/
|
*/
|
||||||
public IProject getProject() {
|
@Override
|
||||||
|
public IProject getProject() {
|
||||||
return project;
|
return project;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#getQuoteIncludePaths(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#getQuoteIncludePaths(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
public IPath[] getQuoteIncludePaths(IPath path) {
|
@Override
|
||||||
|
public IPath[] getQuoteIncludePaths(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
Set<IPath> pathSet = new LinkedHashSet<IPath>();
|
Set<IPath> pathSet = new LinkedHashSet<IPath>();
|
||||||
// get the command
|
// get the command
|
||||||
|
@ -593,7 +610,8 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#getSerializable()
|
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#getSerializable()
|
||||||
*/
|
*/
|
||||||
public IDiscoveredScannerInfoSerializable getSerializable() {
|
@Override
|
||||||
|
public IDiscoveredScannerInfoSerializable getSerializable() {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
return sid;
|
return sid;
|
||||||
}
|
}
|
||||||
|
@ -602,7 +620,8 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo#getSymbols()
|
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IDiscoveredPathInfo#getSymbols()
|
||||||
*/
|
*/
|
||||||
public Map<String, String> getSymbols() {
|
@Override
|
||||||
|
public Map<String, String> getSymbols() {
|
||||||
// return new HashMap();
|
// return new HashMap();
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
return getAllSymbols();
|
return getAllSymbols();
|
||||||
|
@ -615,6 +634,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
* @seeorg.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.
|
* @seeorg.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.
|
||||||
* IDiscoveredPathInfo#getSymbols(org.eclipse.core.runtime.IPath)
|
* IDiscoveredPathInfo#getSymbols(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Map<String, String> getSymbols(IPath path) {
|
public Map<String, String> getSymbols(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
Map<String, String> definedSymbols = new HashMap<String, String>();
|
Map<String, String> definedSymbols = new HashMap<String, String>();
|
||||||
|
@ -650,6 +670,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#isEmpty(org.eclipse.core.runtime.IPath)
|
* @see org.eclipse.cdt.make.core.scannerconfig.IDiscoveredPathManager.IPerFileDiscoveredPathInfo#isEmpty(org.eclipse.core.runtime.IPath)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isEmpty(IPath path) {
|
public boolean isEmpty(IPath path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
boolean rc = true;
|
boolean rc = true;
|
||||||
|
@ -708,7 +729,8 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.internal.core.scannerconfig.DiscoveredScannerInfoStore.IDiscoveredScannerInfoSerializable#deserialize(org.w3c.dom.Element)
|
* @see org.eclipse.cdt.make.internal.core.scannerconfig.DiscoveredScannerInfoStore.IDiscoveredScannerInfoSerializable#deserialize(org.w3c.dom.Element)
|
||||||
*/
|
*/
|
||||||
public void deserialize(Element collectorElem) {
|
@Override
|
||||||
|
public void deserialize(Element collectorElem) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
|
|
||||||
for (Node child = collectorElem.getFirstChild(); child != null; child = child.getNextSibling()) {
|
for (Node child = collectorElem.getFirstChild(); child != null; child = child.getNextSibling()) {
|
||||||
|
@ -777,14 +799,16 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.internal.core.scannerconfig.DiscoveredScannerInfoStore.IDiscoveredScannerInfoSerializable#getCollectorId()
|
* @see org.eclipse.cdt.make.internal.core.scannerconfig.DiscoveredScannerInfoStore.IDiscoveredScannerInfoSerializable#getCollectorId()
|
||||||
*/
|
*/
|
||||||
public String getCollectorId() {
|
@Override
|
||||||
|
public String getCollectorId() {
|
||||||
return COLLECTOR_ID;
|
return COLLECTOR_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.internal.core.scannerconfig.DiscoveredScannerInfoStore.IDiscoveredScannerInfoSerializable#serialize(org.w3c.dom.Element)
|
* @see org.eclipse.cdt.make.internal.core.scannerconfig.DiscoveredScannerInfoStore.IDiscoveredScannerInfoSerializable#serialize(org.w3c.dom.Element)
|
||||||
*/
|
*/
|
||||||
public void serialize(Element collectorElem) {
|
@Override
|
||||||
|
public void serialize(Element collectorElem) {
|
||||||
try {
|
try {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
Document doc = collectorElem.getOwnerDocument();
|
Document doc = collectorElem.getOwnerDocument();
|
||||||
|
@ -1084,6 +1108,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void contributeToScannerConfig(Object resource, Map scannerInfo) {
|
public void contributeToScannerConfig(Object resource, Map scannerInfo) {
|
||||||
// check the resource
|
// check the resource
|
||||||
String errorMessage = null;
|
String errorMessage = null;
|
||||||
|
@ -1142,7 +1167,8 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector2#createPathInfoObject()
|
* @see org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector2#createPathInfoObject()
|
||||||
*/
|
*/
|
||||||
public IDiscoveredPathInfo createPathInfoObject() {
|
@Override
|
||||||
|
public IDiscoveredPathInfo createPathInfoObject() {
|
||||||
return new PerFileDiscoveredPathInfo();
|
return new PerFileDiscoveredPathInfo();
|
||||||
}
|
}
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -1151,7 +1177,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
public void deleteAll(IResource resource) {
|
public void deleteAll(IResource resource) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
if (resource instanceof IProject) {
|
if (resource instanceof IProject) {
|
||||||
fProjectSettingsMap.remove(((IProject) resource));
|
fProjectSettingsMap.remove(resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1191,7 +1217,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
public void deleteAllPaths(IResource resource) {
|
public void deleteAllPaths(IResource resource) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
if (resource instanceof IProject && fProjectSettingsMap != null) {
|
if (resource instanceof IProject && fProjectSettingsMap != null) {
|
||||||
fProjectSettingsMap.remove(((IProject) resource));
|
fProjectSettingsMap.remove(resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1206,7 +1232,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
public void deleteAllSymbols(IResource resource) {
|
public void deleteAllSymbols(IResource resource) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
if (resource instanceof IProject && fProjectSettingsMap != null) {
|
if (resource instanceof IProject && fProjectSettingsMap != null) {
|
||||||
fProjectSettingsMap.remove(((IProject) resource));
|
fProjectSettingsMap.remove(resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1221,7 +1247,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
public void deletePath(IResource resource, String path) {
|
public void deletePath(IResource resource, String path) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
if (resource instanceof IProject && fProjectSettingsMap != null) {
|
if (resource instanceof IProject && fProjectSettingsMap != null) {
|
||||||
fProjectSettingsMap.remove(((IProject) resource));
|
fProjectSettingsMap.remove(resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1236,7 +1262,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
public void deleteSymbol(IResource resource, String symbol) {
|
public void deleteSymbol(IResource resource, String symbol) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
if (resource instanceof IProject && fProjectSettingsMap != null) {
|
if (resource instanceof IProject && fProjectSettingsMap != null) {
|
||||||
fProjectSettingsMap.remove(((IProject) resource));
|
fProjectSettingsMap.remove(resource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1413,7 +1439,8 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector#getCollectedScannerInfo(java.lang.Object, org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes)
|
* @see org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector#getCollectedScannerInfo(java.lang.Object, org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes)
|
||||||
*/
|
*/
|
||||||
public List<CCommandDSC> getCollectedScannerInfo(Object resource, ScannerInfoTypes type) {
|
@Override
|
||||||
|
public List<CCommandDSC> getCollectedScannerInfo(Object resource, ScannerInfoTypes type) {
|
||||||
|
|
||||||
List<CCommandDSC> rv = new ArrayList<CCommandDSC>();
|
List<CCommandDSC> rv = new ArrayList<CCommandDSC>();
|
||||||
// check the resource
|
// check the resource
|
||||||
|
@ -1509,6 +1536,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector#getDefinedSymbols()
|
* @see org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector#getDefinedSymbols()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Map getDefinedSymbols() {
|
public Map getDefinedSymbols() {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
return getAllSymbols();
|
return getAllSymbols();
|
||||||
|
@ -1518,6 +1546,7 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector#getIncludePaths()
|
* @see org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector#getIncludePaths()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public List<String> getIncludePaths() {
|
public List<String> getIncludePaths() {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
List<String> pathStrings = new LinkedList<String>();
|
List<String> pathStrings = new LinkedList<String>();
|
||||||
|
@ -1571,7 +1600,8 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInfoContext(InfoContext context) {
|
@Override
|
||||||
|
public void setInfoContext(InfoContext context) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
this.project = context.getProject();
|
this.project = context.getProject();
|
||||||
this.context = context;
|
this.context = context;
|
||||||
|
@ -1588,13 +1618,15 @@ public class PerFileXLCScannerInfoCollector implements IScannerInfoCollector3, I
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector2#setProject(org.eclipse.core.resources.IProject)
|
* @see org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector2#setProject(org.eclipse.core.resources.IProject)
|
||||||
*/
|
*/
|
||||||
public void setProject(IProject project) {
|
@Override
|
||||||
|
public void setProject(IProject project) {
|
||||||
synchronized (fLock) {
|
synchronized (fLock) {
|
||||||
setInfoContext(new InfoContext(project));
|
setInfoContext(new InfoContext(project));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateScannerConfiguration(IProgressMonitor monitor) throws CoreException {
|
@Override
|
||||||
|
public void updateScannerConfiguration(IProgressMonitor monitor) throws CoreException {
|
||||||
if (monitor == null) {
|
if (monitor == null) {
|
||||||
monitor = new NullProgressMonitor();
|
monitor = new NullProgressMonitor();
|
||||||
}
|
}
|
||||||
|
|
|
@ -611,7 +611,7 @@ public class XLCBuildOutputParserUtility {
|
||||||
*/
|
*/
|
||||||
protected IFile findFileName(String fileName) {
|
protected IFile findFileName(String fileName) {
|
||||||
IPath path = new Path(fileName);
|
IPath path = new Path(fileName);
|
||||||
return (IFile) fFilesInProject.get(path.lastSegment());
|
return fFilesInProject.get(path.lastSegment());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected IFile findFileInWorkspace(IPath path) {
|
protected IFile findFileInWorkspace(IPath path) {
|
||||||
|
|
|
@ -10,23 +10,23 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.make.xlc.core.scannerconfig;
|
package org.eclipse.cdt.make.xlc.core.scannerconfig;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.IMarkerGenerator;
|
||||||
|
import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector;
|
||||||
import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector2;
|
import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector2;
|
||||||
import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser;
|
import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoConsoleParser;
|
||||||
import org.eclipse.cdt.make.core.scannerconfig.IScannerInfoCollector;
|
|
||||||
import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes;
|
import org.eclipse.cdt.make.core.scannerconfig.ScannerInfoTypes;
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil;
|
import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil;
|
||||||
import org.eclipse.cdt.make.xlc.core.activator.Activator;
|
import org.eclipse.cdt.make.xlc.core.activator.Activator;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.cdt.core.IMarkerGenerator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parses output of ppuxlc -E -v specs.c or ppuxlc -E -v specs.cpp command
|
* Parses output of ppuxlc -E -v specs.c or ppuxlc -E -v specs.cpp command
|
||||||
|
@ -72,6 +72,7 @@ public class XlCSpecsConsoleParser implements IScannerInfoConsoleParser {
|
||||||
* org.eclipse.cdt.core.IMarkerGenerator)
|
* org.eclipse.cdt.core.IMarkerGenerator)
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void startup(IProject project, IPath workingDirectory,
|
public void startup(IProject project, IPath workingDirectory,
|
||||||
IScannerInfoCollector collector, IMarkerGenerator markerGenerator) {
|
IScannerInfoCollector collector, IMarkerGenerator markerGenerator) {
|
||||||
this.fProject = project;
|
this.fProject = project;
|
||||||
|
@ -90,6 +91,7 @@ public class XlCSpecsConsoleParser implements IScannerInfoConsoleParser {
|
||||||
* @see org.eclipse.cdt.make.intrenal.core.scannerconfig.gnu.GCCSpecsConsoleParser#processLine(java.lang.String)
|
* @see org.eclipse.cdt.make.intrenal.core.scannerconfig.gnu.GCCSpecsConsoleParser#processLine(java.lang.String)
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean processLine(String line) {
|
public boolean processLine(String line) {
|
||||||
boolean rc = false;
|
boolean rc = false;
|
||||||
TraceUtil.outputTrace(
|
TraceUtil.outputTrace(
|
||||||
|
@ -136,6 +138,7 @@ public class XlCSpecsConsoleParser implements IScannerInfoConsoleParser {
|
||||||
* @see org.eclipse.cdt.make.internal.core.scannerconfig.IScannerInfoConsoleParser#shutdown()
|
* @see org.eclipse.cdt.make.internal.core.scannerconfig.IScannerInfoConsoleParser#shutdown()
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void shutdown() {
|
public void shutdown() {
|
||||||
Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<ScannerInfoTypes, List<String>>();
|
Map<ScannerInfoTypes, List<String>> scannerInfo = new HashMap<ScannerInfoTypes, List<String>>();
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ package org.eclipse.cdt.make.xlc.core.scannerconfig;
|
||||||
|
|
||||||
import org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider;
|
import org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider;
|
||||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.macros.BuildMacroProvider;
|
|
||||||
import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
|
import org.eclipse.cdt.managedbuilder.macros.BuildMacroException;
|
||||||
import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
|
import org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
|
@ -30,6 +29,7 @@ public class XlCSpecsRunSIProvider extends GCCSpecsRunSIProvider {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider#initialize()
|
* @see org.eclipse.cdt.make.internal.core.scannerconfig2.GCCSpecsRunSIProvider#initialize()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected boolean initialize() {
|
protected boolean initialize() {
|
||||||
|
|
||||||
boolean rc = super.initialize();
|
boolean rc = super.initialize();
|
||||||
|
|
|
@ -27,6 +27,7 @@ public class AixConfigurationEnvironmentSupplier implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier#getVariable(java.lang.String, org.eclipse.cdt.managedbuilder.core.IConfiguration, org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider)
|
* @see org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier#getVariable(java.lang.String, org.eclipse.cdt.managedbuilder.core.IConfiguration, org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBuildEnvironmentVariable getVariable(String variableName,
|
public IBuildEnvironmentVariable getVariable(String variableName,
|
||||||
IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
||||||
|
|
||||||
|
@ -40,6 +41,7 @@ public class AixConfigurationEnvironmentSupplier implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier#getVariables(org.eclipse.cdt.managedbuilder.core.IConfiguration, org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider)
|
* @see org.eclipse.cdt.managedbuilder.envvar.IConfigurationEnvironmentVariableSupplier#getVariables(org.eclipse.cdt.managedbuilder.core.IConfiguration, org.eclipse.cdt.managedbuilder.envvar.IEnvironmentVariableProvider)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBuildEnvironmentVariable[] getVariables(
|
public IBuildEnvironmentVariable[] getVariables(
|
||||||
IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
IConfiguration configuration, IEnvironmentVariableProvider provider) {
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ public class AixPathResolver implements IBuildPathResolver {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IBuildPathResolver#resolveBuildPaths(int, java.lang.String, java.lang.String, org.eclipse.cdt.managedbuilder.core.IConfiguration)
|
* @see org.eclipse.cdt.managedbuilder.core.IBuildPathResolver#resolveBuildPaths(int, java.lang.String, java.lang.String, org.eclipse.cdt.managedbuilder.core.IConfiguration)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String[] resolveBuildPaths(int pathType, String variableName,
|
public String[] resolveBuildPaths(int pathType, String variableName,
|
||||||
String variableValue, IConfiguration configuration) {
|
String variableValue, IConfiguration configuration) {
|
||||||
return variableValue.split(DELIMITER_AIX);
|
return variableValue.split(DELIMITER_AIX);
|
||||||
|
|
|
@ -31,6 +31,7 @@ public class XLCProjectMacroSupplier implements IProjectBuildMacroSupplier {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.macros.IProjectBuildMacroSupplier#getMacro(java.lang.String, org.eclipse.cdt.managedbuilder.core.IManagedProject, org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider)
|
* @see org.eclipse.cdt.managedbuilder.macros.IProjectBuildMacroSupplier#getMacro(java.lang.String, org.eclipse.cdt.managedbuilder.core.IManagedProject, org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBuildMacro getMacro(String macroName, IManagedProject project,
|
public IBuildMacro getMacro(String macroName, IManagedProject project,
|
||||||
IBuildMacroProvider provider) {
|
IBuildMacroProvider provider) {
|
||||||
|
|
||||||
|
@ -68,6 +69,7 @@ public class XLCProjectMacroSupplier implements IProjectBuildMacroSupplier {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.macros.IProjectBuildMacroSupplier#getMacros(org.eclipse.cdt.managedbuilder.core.IManagedProject, org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider)
|
* @see org.eclipse.cdt.managedbuilder.macros.IProjectBuildMacroSupplier#getMacros(org.eclipse.cdt.managedbuilder.core.IManagedProject, org.eclipse.cdt.managedbuilder.macros.IBuildMacroProvider)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IBuildMacro[] getMacros(IManagedProject project,
|
public IBuildMacro[] getMacros(IManagedProject project,
|
||||||
IBuildMacroProvider provider) {
|
IBuildMacroProvider provider) {
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,11 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.managedbuilder.xlc.ui;
|
package org.eclipse.cdt.managedbuilder.xlc.ui;
|
||||||
|
|
||||||
import org.eclipse.core.runtime.Plugin;
|
import java.util.MissingResourceException;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||||
import org.osgi.framework.BundleContext;
|
import org.osgi.framework.BundleContext;
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main plugin class to be used in the desktop.
|
* The main plugin class to be used in the desktop.
|
||||||
|
@ -36,6 +37,7 @@ public class XLCUIPlugin extends AbstractUIPlugin {
|
||||||
/**
|
/**
|
||||||
* This method is called upon plug-in activation
|
* This method is called upon plug-in activation
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.start(context);
|
super.start(context);
|
||||||
}
|
}
|
||||||
|
@ -43,6 +45,7 @@ public class XLCUIPlugin extends AbstractUIPlugin {
|
||||||
/**
|
/**
|
||||||
* This method is called when the plug-in is stopped
|
* This method is called when the plug-in is stopped
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
super.stop(context);
|
super.stop(context);
|
||||||
plugin = null;
|
plugin = null;
|
||||||
|
|
|
@ -11,11 +11,10 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.managedbuilder.xlc.ui.preferences;
|
package org.eclipse.cdt.managedbuilder.xlc.ui.preferences;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.managedbuilder.xlc.ui.XLCUIPlugin;
|
||||||
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
|
|
||||||
import org.eclipse.cdt.managedbuilder.xlc.ui.XLCUIPlugin;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class used to initialize default preference values.
|
* Class used to initialize default preference values.
|
||||||
*/
|
*/
|
||||||
|
@ -26,6 +25,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
|
||||||
*
|
*
|
||||||
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
|
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void initializeDefaultPreferences() {
|
public void initializeDefaultPreferences() {
|
||||||
IPreferenceStore store = XLCUIPlugin.getDefault().getPreferenceStore();
|
IPreferenceStore store = XLCUIPlugin.getDefault().getPreferenceStore();
|
||||||
store.setDefault(PreferenceConstants.P_XL_COMPILER_ROOT, "/usr/vacpp/bin"); //$NON-NLS-1$
|
store.setDefault(PreferenceConstants.P_XL_COMPILER_ROOT, "/usr/vacpp/bin"); //$NON-NLS-1$
|
||||||
|
|
|
@ -11,12 +11,14 @@
|
||||||
|
|
||||||
package org.eclipse.cdt.managedbuilder.xlc.ui.preferences;
|
package org.eclipse.cdt.managedbuilder.xlc.ui.preferences;
|
||||||
|
|
||||||
import org.eclipse.jface.dialogs.IMessageProvider;
|
|
||||||
import org.eclipse.jface.preference.*;
|
|
||||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
|
||||||
import org.eclipse.ui.IWorkbench;
|
|
||||||
import org.eclipse.cdt.managedbuilder.xlc.ui.Messages;
|
import org.eclipse.cdt.managedbuilder.xlc.ui.Messages;
|
||||||
import org.eclipse.cdt.managedbuilder.xlc.ui.XLCUIPlugin;
|
import org.eclipse.cdt.managedbuilder.xlc.ui.XLCUIPlugin;
|
||||||
|
import org.eclipse.jface.dialogs.IMessageProvider;
|
||||||
|
import org.eclipse.jface.preference.ComboFieldEditor;
|
||||||
|
import org.eclipse.jface.preference.DirectoryFieldEditor;
|
||||||
|
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||||
|
import org.eclipse.ui.IWorkbench;
|
||||||
|
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class represents a preference page that
|
* This class represents a preference page that
|
||||||
|
@ -50,10 +52,12 @@ public class XLCompilerPreferencePage
|
||||||
* of preferences. Each field editor knows how to save and
|
* of preferences. Each field editor knows how to save and
|
||||||
* restore itself.
|
* restore itself.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void createFieldEditors() {
|
public void createFieldEditors() {
|
||||||
|
|
||||||
DirectoryFieldEditor pathEditor = new DirectoryFieldEditor(PreferenceConstants.P_XL_COMPILER_ROOT, Messages.XLCompilerPreferencePage_1, getFieldEditorParent())
|
DirectoryFieldEditor pathEditor = new DirectoryFieldEditor(PreferenceConstants.P_XL_COMPILER_ROOT, Messages.XLCompilerPreferencePage_1, getFieldEditorParent())
|
||||||
{
|
{
|
||||||
|
@Override
|
||||||
protected boolean doCheckState()
|
protected boolean doCheckState()
|
||||||
{
|
{
|
||||||
// always return true, as we don't want to fail cases when compiler is installed remotely
|
// always return true, as we don't want to fail cases when compiler is installed remotely
|
||||||
|
@ -70,6 +74,7 @@ public class XLCompilerPreferencePage
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected boolean checkState()
|
protected boolean checkState()
|
||||||
{
|
{
|
||||||
return doCheckState();
|
return doCheckState();
|
||||||
|
@ -92,6 +97,7 @@ public class XLCompilerPreferencePage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
|
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void init(IWorkbench workbench)
|
public void init(IWorkbench workbench)
|
||||||
{
|
{
|
||||||
originalMessage = getMessage();
|
originalMessage = getMessage();
|
||||||
|
|
|
@ -27,6 +27,7 @@ public class HiddenOptionApplicabilityCalculator implements
|
||||||
* This function decides if the option for which this class
|
* This function decides if the option for which this class
|
||||||
* is option applicability calculator is enabled or not.
|
* is option applicability calculator is enabled or not.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOptionEnabled(IBuildObject configuration,
|
public boolean isOptionEnabled(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -38,6 +39,7 @@ public class HiddenOptionApplicabilityCalculator implements
|
||||||
* or not.
|
* or not.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isOptionUsedInCommandLine(IBuildObject configuration,
|
public boolean isOptionUsedInCommandLine(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -48,6 +50,7 @@ public class HiddenOptionApplicabilityCalculator implements
|
||||||
* is option applicability calculator is visible or not.
|
* is option applicability calculator is visible or not.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isOptionVisible(IBuildObject configuration,
|
public boolean isOptionVisible(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
import java.util.ResourceBundle;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.eclipse.cdt.managedbuilder.core.IBuildObject;
|
import org.eclipse.cdt.managedbuilder.core.IBuildObject;
|
||||||
|
@ -255,6 +254,7 @@ public class XLCApplicabilityCalculator implements IOptionApplicability
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionEnabled(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionEnabled(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOptionEnabled(IBuildObject configuration,
|
public boolean isOptionEnabled(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
return isApplicable(configuration, holder, option);
|
return isApplicable(configuration, holder, option);
|
||||||
|
@ -263,6 +263,7 @@ public class XLCApplicabilityCalculator implements IOptionApplicability
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionUsedInCommandLine(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionUsedInCommandLine(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOptionUsedInCommandLine(IBuildObject configuration,
|
public boolean isOptionUsedInCommandLine(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
return isApplicable(configuration, holder, option);
|
return isApplicable(configuration, holder, option);
|
||||||
|
@ -271,6 +272,7 @@ public class XLCApplicabilityCalculator implements IOptionApplicability
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionVisible(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionVisible(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOptionVisible(IBuildObject configuration,
|
public boolean isOptionVisible(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
return isApplicable(configuration, holder, option);
|
return isApplicable(configuration, holder, option);
|
||||||
|
|
|
@ -37,6 +37,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
|
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected void createFieldEditors() {
|
protected void createFieldEditors() {
|
||||||
createPathEditor();
|
createPathEditor();
|
||||||
createVersionEditor();
|
createVersionEditor();
|
||||||
|
@ -56,6 +57,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
|
||||||
|
|
||||||
fPathEditor = new DirectoryFieldEditor(PreferenceConstants.P_XL_COMPILER_ROOT,
|
fPathEditor = new DirectoryFieldEditor(PreferenceConstants.P_XL_COMPILER_ROOT,
|
||||||
Messages.XLCompilerPropertyPage_0, parent) {
|
Messages.XLCompilerPropertyPage_0, parent) {
|
||||||
|
@Override
|
||||||
protected boolean doCheckState() {
|
protected boolean doCheckState() {
|
||||||
// always return true, as we don't want to fail cases when
|
// always return true, as we don't want to fail cases when
|
||||||
// compiler is installed remotely
|
// compiler is installed remotely
|
||||||
|
@ -69,6 +71,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected boolean checkState() {
|
protected boolean checkState() {
|
||||||
return doCheckState();
|
return doCheckState();
|
||||||
}
|
}
|
||||||
|
@ -147,6 +150,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
|
||||||
originalMessage = getMessage();
|
originalMessage = getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
protected void performDefaults() {
|
protected void performDefaults() {
|
||||||
// default to whatever is set on the workbench preference
|
// default to whatever is set on the workbench preference
|
||||||
IPreferenceStore prefStore = XLCUIPlugin.getDefault().getPreferenceStore();
|
IPreferenceStore prefStore = XLCUIPlugin.getDefault().getPreferenceStore();
|
||||||
|
@ -171,6 +175,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
|
||||||
*
|
*
|
||||||
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
|
* @see org.eclipse.jface.preference.FieldEditorPreferencePage#performOk()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean performOk() {
|
public boolean performOk() {
|
||||||
// store the value in the owner text field
|
// store the value in the owner text field
|
||||||
try {
|
try {
|
||||||
|
@ -203,6 +208,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
|
||||||
*
|
*
|
||||||
* @see org.eclipse.ui.IWorkbenchPropertyPage#getElement()
|
* @see org.eclipse.ui.IWorkbenchPropertyPage#getElement()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public IAdaptable getElement() {
|
public IAdaptable getElement() {
|
||||||
return element;
|
return element;
|
||||||
}
|
}
|
||||||
|
@ -213,6 +219,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
|
||||||
* @param element
|
* @param element
|
||||||
* the element
|
* the element
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setElement(IAdaptable element) {
|
public void setElement(IAdaptable element) {
|
||||||
this.element = element;
|
this.element = element;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,7 @@ public class XLCv8ApplicabiltyCalculator implements IOptionApplicability {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionEnabled(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionEnabled(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOptionEnabled(IBuildObject configuration,
|
public boolean isOptionEnabled(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
return isVersion8(configuration);
|
return isVersion8(configuration);
|
||||||
|
@ -101,6 +102,7 @@ public class XLCv8ApplicabiltyCalculator implements IOptionApplicability {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionUsedInCommandLine(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionUsedInCommandLine(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOptionUsedInCommandLine(IBuildObject configuration,
|
public boolean isOptionUsedInCommandLine(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
return isVersion8(configuration);
|
return isVersion8(configuration);
|
||||||
|
@ -109,6 +111,7 @@ public class XLCv8ApplicabiltyCalculator implements IOptionApplicability {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionVisible(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionVisible(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOptionVisible(IBuildObject configuration,
|
public boolean isOptionVisible(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
return isVersion8(configuration);
|
return isVersion8(configuration);
|
||||||
|
|
|
@ -95,6 +95,7 @@ public class XLCv9ApplicabilityCalculator implements IOptionApplicability {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionEnabled(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionEnabled(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOptionEnabled(IBuildObject configuration,
|
public boolean isOptionEnabled(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
return isVersion9(configuration);
|
return isVersion9(configuration);
|
||||||
|
@ -103,6 +104,7 @@ public class XLCv9ApplicabilityCalculator implements IOptionApplicability {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionUsedInCommandLine(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionUsedInCommandLine(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOptionUsedInCommandLine(IBuildObject configuration,
|
public boolean isOptionUsedInCommandLine(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
return isVersion9(configuration);
|
return isVersion9(configuration);
|
||||||
|
@ -111,6 +113,7 @@ public class XLCv9ApplicabilityCalculator implements IOptionApplicability {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionVisible(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
* @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionVisible(org.eclipse.cdt.managedbuilder.core.IBuildObject, org.eclipse.cdt.managedbuilder.core.IHoldsOptions, org.eclipse.cdt.managedbuilder.core.IOption)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public boolean isOptionVisible(IBuildObject configuration,
|
public boolean isOptionVisible(IBuildObject configuration,
|
||||||
IHoldsOptions holder, IOption option) {
|
IHoldsOptions holder, IOption option) {
|
||||||
return isVersion9(configuration);
|
return isVersion9(configuration);
|
||||||
|
|
|
@ -26,6 +26,7 @@ public class DynamicVariableResolver implements IDynamicVariableResolver {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.core.variables.IDynamicVariableResolver#resolveValue(org.eclipse.core.variables.IDynamicVariable, java.lang.String)
|
* @see org.eclipse.core.variables.IDynamicVariableResolver#resolveValue(org.eclipse.core.variables.IDynamicVariable, java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String resolveValue(IDynamicVariable variable, String argument)
|
public String resolveValue(IDynamicVariable variable, String argument)
|
||||||
throws CoreException {
|
throws CoreException {
|
||||||
|
|
||||||
|
|
|
@ -49,11 +49,13 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
this.composite = composite;
|
this.composite = composite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
// meaningless for a button... do nothing
|
// meaningless for a button... do nothing
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
// open a browse dialog
|
// open a browse dialog
|
||||||
DirectoryDialog dirDialog = new DirectoryDialog(composite.getShell(), SWT.APPLICATION_MODAL);
|
DirectoryDialog dirDialog = new DirectoryDialog(composite.getShell(), SWT.APPLICATION_MODAL);
|
||||||
|
@ -94,6 +96,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage#isCustomPageComplete()
|
* @see org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPage#isCustomPageComplete()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
protected boolean isCustomPageComplete() {
|
protected boolean isCustomPageComplete() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -101,6 +104,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.wizard.IWizardPage#getName()
|
* @see org.eclipse.jface.wizard.IWizardPage#getName()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
String name = Messages.XLCSettingsWizardPage_0;
|
String name = Messages.XLCSettingsWizardPage_0;
|
||||||
return name;
|
return name;
|
||||||
|
@ -109,6 +113,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
|
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void createControl(Composite parent) {
|
public void createControl(Composite parent) {
|
||||||
// create a new composite
|
// create a new composite
|
||||||
fComposite = new Composite(parent, SWT.NONE);
|
fComposite = new Composite(parent, SWT.NONE);
|
||||||
|
@ -140,6 +145,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
|
|
||||||
fDirTextBox.addModifyListener(new ModifyListener() {
|
fDirTextBox.addModifyListener(new ModifyListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
// update the page manager with the setting
|
// update the page manager with the setting
|
||||||
MBSCustomPageManager.addPageProperty(pageID, PreferenceConstants.P_XL_COMPILER_ROOT, fDirTextBox.getText());
|
MBSCustomPageManager.addPageProperty(pageID, PreferenceConstants.P_XL_COMPILER_ROOT, fDirTextBox.getText());
|
||||||
|
@ -189,6 +195,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
|
|
||||||
fVersionCombo.addModifyListener(new ModifyListener() {
|
fVersionCombo.addModifyListener(new ModifyListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
// update the page manager with the setting
|
// update the page manager with the setting
|
||||||
MBSCustomPageManager.addPageProperty(pageID, PreferenceConstants.P_XLC_COMPILER_VERSION, PreferenceConstants.getVersion(fVersionCombo.getText()));
|
MBSCustomPageManager.addPageProperty(pageID, PreferenceConstants.P_XLC_COMPILER_VERSION, PreferenceConstants.getVersion(fVersionCombo.getText()));
|
||||||
|
@ -204,6 +211,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#dispose()
|
* @see org.eclipse.jface.dialogs.IDialogPage#dispose()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
fComposite.dispose();
|
fComposite.dispose();
|
||||||
}
|
}
|
||||||
|
@ -211,6 +219,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#getControl()
|
* @see org.eclipse.jface.dialogs.IDialogPage#getControl()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Control getControl() {
|
public Control getControl() {
|
||||||
return fComposite;
|
return fComposite;
|
||||||
}
|
}
|
||||||
|
@ -218,6 +227,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#getDescription()
|
* @see org.eclipse.jface.dialogs.IDialogPage#getDescription()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
return Messages.XLCSettingsWizardPage_4;
|
return Messages.XLCSettingsWizardPage_4;
|
||||||
}
|
}
|
||||||
|
@ -225,6 +235,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#getErrorMessage()
|
* @see org.eclipse.jface.dialogs.IDialogPage#getErrorMessage()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getErrorMessage() {
|
public String getErrorMessage() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
return null;
|
return null;
|
||||||
|
@ -233,6 +244,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#getImage()
|
* @see org.eclipse.jface.dialogs.IDialogPage#getImage()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public Image getImage() {
|
public Image getImage() {
|
||||||
return wizard.getDefaultPageImage();
|
return wizard.getDefaultPageImage();
|
||||||
}
|
}
|
||||||
|
@ -240,6 +252,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#getMessage()
|
* @see org.eclipse.jface.dialogs.IDialogPage#getMessage()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getMessage() {
|
public String getMessage() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -247,6 +260,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#getTitle()
|
* @see org.eclipse.jface.dialogs.IDialogPage#getTitle()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return Messages.XLCSettingsWizardPage_5;
|
return Messages.XLCSettingsWizardPage_5;
|
||||||
}
|
}
|
||||||
|
@ -254,6 +268,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#performHelp()
|
* @see org.eclipse.jface.dialogs.IDialogPage#performHelp()
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void performHelp() {
|
public void performHelp() {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
@ -262,6 +277,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#setDescription(java.lang.String)
|
* @see org.eclipse.jface.dialogs.IDialogPage#setDescription(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setDescription(String description) {
|
public void setDescription(String description) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
@ -270,6 +286,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#setImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)
|
* @see org.eclipse.jface.dialogs.IDialogPage#setImageDescriptor(org.eclipse.jface.resource.ImageDescriptor)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setImageDescriptor(ImageDescriptor image) {
|
public void setImageDescriptor(ImageDescriptor image) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
@ -278,6 +295,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#setTitle(java.lang.String)
|
* @see org.eclipse.jface.dialogs.IDialogPage#setTitle(java.lang.String)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setTitle(String title) {
|
public void setTitle(String title) {
|
||||||
// TODO Auto-generated method stub
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
@ -286,6 +304,7 @@ public class XLCSettingsWizardPage extends MBSCustomPage {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean)
|
* @see org.eclipse.jface.dialogs.IDialogPage#setVisible(boolean)
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void setVisible(boolean visible) {
|
public void setVisible(boolean visible) {
|
||||||
fComposite.setVisible(visible);
|
fComposite.setVisible(visible);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@ import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.QualifiedName;
|
import org.eclipse.core.runtime.QualifiedName;
|
||||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||||
import org.eclipse.jface.wizard.IWizard;
|
|
||||||
import org.eclipse.jface.wizard.IWizardPage;
|
import org.eclipse.jface.wizard.IWizardPage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -35,6 +34,7 @@ public class XLCSettingsWizardRunnable implements IRunnableWithProgress {
|
||||||
public XLCSettingsWizardRunnable() {
|
public XLCSettingsWizardRunnable() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
|
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
|
||||||
// take the data from the page manager, and set the project properties with it
|
// take the data from the page manager, and set the project properties with it
|
||||||
String compilerPath = MBSCustomPageManager.getPageProperty(pageId, PreferenceConstants.P_XL_COMPILER_ROOT).toString();
|
String compilerPath = MBSCustomPageManager.getPageProperty(pageId, PreferenceConstants.P_XL_COMPILER_ROOT).toString();
|
||||||
|
|
|
@ -25,11 +25,13 @@ public class Activator extends AbstractUIPlugin {
|
||||||
public Activator() {
|
public Activator() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.start(context);
|
super.start(context);
|
||||||
plugin = this;
|
plugin = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
plugin = null;
|
plugin = null;
|
||||||
super.stop(context);
|
super.stop(context);
|
||||||
|
|
|
@ -58,9 +58,11 @@ public class UpcProjectWizard extends CDTCommonProjectWizard {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void addPages() {
|
public void addPages() {
|
||||||
fMainPage = new CDTMainWizardPage(PAGE_NAME) {
|
fMainPage = new CDTMainWizardPage(PAGE_NAME) {
|
||||||
|
|
||||||
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public List filterItems(List items) {
|
public List filterItems(List items) {
|
||||||
// filter out all non-UPC project types
|
// filter out all non-UPC project types
|
||||||
|
@ -82,6 +84,7 @@ public class UpcProjectWizard extends CDTCommonProjectWizard {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
protected IProject continueCreation(IProject prj) {
|
protected IProject continueCreation(IProject prj) {
|
||||||
try {
|
try {
|
||||||
CProjectNature.addCNature(prj, new NullProgressMonitor());
|
CProjectNature.addCNature(prj, new NullProgressMonitor());
|
||||||
|
@ -90,6 +93,7 @@ public class UpcProjectWizard extends CDTCommonProjectWizard {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public String[] getNatures() {
|
public String[] getNatures() {
|
||||||
return new String[] { CProjectNature.C_NATURE_ID/*, CCProjectNature.CC_NATURE_ID, RemoteNature.REMOTE_NATURE_ID*/};
|
return new String[] { CProjectNature.C_NATURE_ID/*, CCProjectNature.CC_NATURE_ID, RemoteNature.REMOTE_NATURE_ID*/};
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,12 @@ public class XLUpcSettingsWizardPage extends XLCSettingsWizardPage {
|
||||||
pageID = PAGE_ID;
|
pageID = PAGE_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return Messages.XLUpcSettingsWizardPage_0;
|
return Messages.XLUpcSettingsWizardPage_0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return Messages.XLUpcSettingsWizardPage_1;
|
return Messages.XLUpcSettingsWizardPage_1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ public class XLUpcSettingsWizardRunnable extends XLCSettingsWizardRunnable {
|
||||||
pageId = XLUpcSettingsWizardPage.PAGE_ID;
|
pageId = XLUpcSettingsWizardPage.PAGE_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
|
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
|
||||||
super.run(monitor);
|
super.run(monitor);
|
||||||
// get a handle to the wizard
|
// get a handle to the wizard
|
||||||
|
|
Loading…
Add table
Reference in a new issue