mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-30 21:55:31 +02:00
Bug #182450 : Multi cfg support
This commit is contained in:
parent
ada2cc0c2c
commit
e88356657e
9 changed files with 126 additions and 95 deletions
|
@ -47,19 +47,19 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
|||
private static final int TRI_STATES_SIZE = 4;
|
||||
// Widgets
|
||||
//3
|
||||
private Button b_stopOnError;
|
||||
private Button b_parallel;
|
||||
private Button b_stopOnError; // 3
|
||||
private Button b_parallel; // 3
|
||||
|
||||
private Button b_parallelOpt;
|
||||
private Button b_parallelNum;
|
||||
private Spinner parallelProcesses;
|
||||
|
||||
private Label title2;
|
||||
private Button b_autoBuild;
|
||||
private Button b_autoBuild; //3
|
||||
private Text t_autoBuild;
|
||||
private Button b_cmdBuild;
|
||||
private Button b_cmdBuild; //3
|
||||
private Text t_cmdBuild;
|
||||
private Button b_cmdClean;
|
||||
private Button b_cmdClean; // 3
|
||||
private Text t_cmdClean;
|
||||
|
||||
private IBuilder bldr;
|
||||
|
@ -186,32 +186,46 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
|||
* 1: supportsStopOnError(true)
|
||||
* 2: bld.supportsStopOnError(false)
|
||||
* 3: cfg.getInternalBuilderParallel()
|
||||
* Mode 2:
|
||||
* 0: b.isAutoBuildEnable()
|
||||
* 1: b.isIncrementalBuildEnabled()
|
||||
* 2: b.isCleanBuildEnabled()
|
||||
* 3: getParallelDef()
|
||||
*/
|
||||
static int[] calc3states(ICPropertyProvider p,
|
||||
IConfiguration c,
|
||||
boolean p0) {
|
||||
int mode) {
|
||||
if (p.isMultiCfg() &&
|
||||
c instanceof ICMultiItemsHolder)
|
||||
{
|
||||
boolean p0 = (mode == 0);
|
||||
boolean p1 = (mode == 1);
|
||||
|
||||
IConfiguration[] cfs = (IConfiguration[])((ICMultiItemsHolder)c).getItems();
|
||||
IBuilder b = cfs[0].getBuilder();
|
||||
int[] res = new int[TRI_STATES_SIZE];
|
||||
boolean[] x = new boolean[TRI_STATES_SIZE];
|
||||
x[0] = p0 ? b.isManagedBuildOn() : b.isStopOnError();
|
||||
x[1] = p0 ? b.isDefaultBuildCmd(): b.supportsStopOnError(true);
|
||||
x[0] = p0 ? b.isManagedBuildOn() :
|
||||
(p1 ? b.isStopOnError() : b.isAutoBuildEnable());
|
||||
x[1] = p0 ? b.isDefaultBuildCmd():
|
||||
(p1 ? b.supportsStopOnError(true) : b.isIncrementalBuildEnabled() );
|
||||
x[2] = p0 ? b.canKeepEnvironmentVariablesInBuildfile() :
|
||||
b.supportsStopOnError(false);
|
||||
(p1 ? b.supportsStopOnError(false) : b.isCleanBuildEnabled());
|
||||
x[3] = p0 ? b.keepEnvironmentVariablesInBuildfile() :
|
||||
((Configuration)cfs[0]).getInternalBuilderParallel();
|
||||
( p1 ? ((Configuration)cfs[0]).getInternalBuilderParallel() : getParallelDef(c));
|
||||
for (int i=1; i<cfs.length; i++) {
|
||||
b = cfs[i].getBuilder();
|
||||
if (x[0] != (p0 ? b.isManagedBuildOn() : b.isStopOnError()))
|
||||
if (x[0] != (p0 ? b.isManagedBuildOn() :
|
||||
(p1 ? b.isStopOnError() : b.isAutoBuildEnable())))
|
||||
res[0] = TRI_UNKNOWN;
|
||||
if (x[1] != (p0 ? b.isDefaultBuildCmd() : b.supportsStopOnError(true)))
|
||||
if (x[1] != (p0 ? b.isDefaultBuildCmd() :
|
||||
(p1 ? b.supportsStopOnError(true) : b.isIncrementalBuildEnabled())))
|
||||
res[1] = TRI_UNKNOWN;
|
||||
if (x[2] != (p0 ? b.canKeepEnvironmentVariablesInBuildfile() : b.supportsStopOnError(false)))
|
||||
if (x[2] != (p0 ? b.canKeepEnvironmentVariablesInBuildfile() :
|
||||
(p1 ? b.supportsStopOnError(false) : b.isCleanBuildEnabled())))
|
||||
res[2] = TRI_UNKNOWN;
|
||||
if (x[3] != (p0 ? b.keepEnvironmentVariablesInBuildfile() : ((Configuration)cfs[i]).getInternalBuilderParallel()))
|
||||
if (x[3] != (p0 ? b.keepEnvironmentVariablesInBuildfile() :
|
||||
(p1 ? ((Configuration)cfs[i]).getInternalBuilderParallel() : getParallelDef(c))))
|
||||
res[3] = TRI_UNKNOWN;
|
||||
}
|
||||
for (int i=0; i<TRI_STATES_SIZE; i++) {
|
||||
|
@ -229,7 +243,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
|||
protected void updateButtons() {
|
||||
bldr = icfg.getEditableBuilder();
|
||||
|
||||
int[] extStates = calc3states(page, icfg, false);
|
||||
int[] extStates = calc3states(page, icfg, 1);
|
||||
|
||||
if (extStates != null) {
|
||||
setTriSelection(b_stopOnError, extStates[0]);
|
||||
|
@ -237,19 +251,17 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
|||
extStates[1] == TRI_YES &&
|
||||
extStates[2] == TRI_YES);
|
||||
} else {
|
||||
setTriSelection(b_stopOnError, bldr.isStopOnError() ? TRI_YES : TRI_NO);
|
||||
setTriSelection(b_stopOnError, bldr.isStopOnError());
|
||||
b_stopOnError.setEnabled(
|
||||
bldr.supportsStopOnError(true) &&
|
||||
bldr.supportsStopOnError(false));
|
||||
}
|
||||
// parallel
|
||||
if (extStates == null) // no extended states
|
||||
setTriSelection(b_parallel, getInternalBuilderParallel() ? TRI_YES : TRI_NO);
|
||||
setTriSelection(b_parallel, getInternalBuilderParallel());
|
||||
else
|
||||
setTriSelection(b_parallel, extStates[3]);
|
||||
|
||||
b_parallelOpt.setSelection(getParallelDef());
|
||||
b_parallelNum.setSelection(!getParallelDef());
|
||||
int n = getParallelNumber();
|
||||
if (n < 0) n = -n;
|
||||
parallelProcesses.setSelection(n);
|
||||
|
@ -259,11 +271,27 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
|||
b_parallelNum.setVisible(bldr.supportsParallelBuild());
|
||||
parallelProcesses.setVisible(bldr.supportsParallelBuild());
|
||||
|
||||
b_autoBuild.setSelection(bldr.isAutoBuildEnable());
|
||||
extStates = calc3states(page, icfg, 2);
|
||||
if (extStates == null) {
|
||||
setTriSelection(b_autoBuild, bldr.isAutoBuildEnable());
|
||||
setTriSelection(b_cmdBuild, bldr.isIncrementalBuildEnabled());
|
||||
setTriSelection(b_cmdClean, bldr.isCleanBuildEnabled());
|
||||
b_parallelOpt.setSelection(getParallelDef(icfg));
|
||||
b_parallelNum.setSelection(!getParallelDef(icfg));
|
||||
} else {
|
||||
setTriSelection(b_autoBuild, extStates[0]);
|
||||
setTriSelection(b_cmdBuild, extStates[1]);
|
||||
setTriSelection(b_cmdClean, extStates[2]);
|
||||
if (extStates[3] == TRI_UNKNOWN) {
|
||||
b_parallelOpt.setSelection(false);
|
||||
b_parallelNum.setSelection(false);
|
||||
} else {
|
||||
b_parallelOpt.setSelection(getParallelDef(icfg));
|
||||
b_parallelNum.setSelection(!getParallelDef(icfg));
|
||||
}
|
||||
}
|
||||
t_autoBuild.setText(bldr.getBuildAttribute(IBuilder.BUILD_TARGET_AUTO, EMPTY_STR));
|
||||
b_cmdBuild.setSelection(bldr.isIncrementalBuildEnabled());
|
||||
t_cmdBuild.setText(bldr.getBuildAttribute(IBuilder.BUILD_TARGET_INCREMENTAL, EMPTY_STR));
|
||||
b_cmdClean.setSelection(bldr.isCleanBuildEnabled());
|
||||
t_cmdClean.setText(bldr.getBuildAttribute(IBuilder.BUILD_TARGET_CLEAN, EMPTY_STR));
|
||||
|
||||
boolean external = ! isInternalBuilderEnabled();
|
||||
|
@ -282,9 +310,9 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
|||
((Control)t_cmdClean.getData()).setVisible(external);
|
||||
|
||||
if (external) {
|
||||
checkPressed(b_autoBuild);
|
||||
checkPressed(b_cmdBuild);
|
||||
checkPressed(b_cmdClean);
|
||||
checkPressed(b_autoBuild, false);
|
||||
checkPressed(b_cmdBuild, false);
|
||||
checkPressed(b_cmdClean, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -318,11 +346,11 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
|||
}
|
||||
|
||||
public void checkPressed(SelectionEvent e) {
|
||||
checkPressed((Control)e.widget);
|
||||
checkPressed((Control)e.widget, true);
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
private void checkPressed(Control b) {
|
||||
private void checkPressed(Control b, boolean needsUpdate) {
|
||||
if (b == null) return;
|
||||
|
||||
boolean val = false;
|
||||
|
@ -336,7 +364,8 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
|||
c.setEnabled(val);
|
||||
}
|
||||
}
|
||||
setValue(b, val);
|
||||
if (needsUpdate)
|
||||
setValue(b, val);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -379,11 +408,11 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
|||
updateData(getResDesc());
|
||||
}
|
||||
|
||||
private boolean getParallelDef() {
|
||||
if (icfg instanceof Configuration)
|
||||
return ((Configuration)icfg).getParallelDef();
|
||||
if (icfg instanceof IMultiConfiguration)
|
||||
return ((IMultiConfiguration)icfg).getParallelDef();
|
||||
private static boolean getParallelDef(IConfiguration cfg) {
|
||||
if (cfg instanceof Configuration)
|
||||
return ((Configuration)cfg).getParallelDef();
|
||||
if (cfg instanceof IMultiConfiguration)
|
||||
return ((IMultiConfiguration)cfg).getParallelDef();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -95,13 +95,13 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
//tool command-line-pattern field
|
||||
private StringFieldEditor commandLinePatternField;
|
||||
// A list of safe options to put unrecognized values in
|
||||
private Vector defaultOptionNames;
|
||||
private Vector<String> defaultOptionNames;
|
||||
// Map that holds all string options and its values
|
||||
private HashMap stringOptionsMap;
|
||||
private HashMap<String, String> stringOptionsMap;
|
||||
|
||||
private ITool fTool;
|
||||
// Map that holds all user object options and its values
|
||||
private HashMap userObjsMap;
|
||||
private HashMap<String, String> userObjsMap;
|
||||
|
||||
public BuildToolSettingUI(AbstractCBuildPropertyTab page,
|
||||
IResourceInfo info, ITool _tool) {
|
||||
|
@ -110,8 +110,8 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
super(info);
|
||||
this.fTool = _tool;
|
||||
buildPropPage = page;
|
||||
stringOptionsMap = new HashMap();
|
||||
userObjsMap = new HashMap();
|
||||
stringOptionsMap = new HashMap<String, String>();
|
||||
userObjsMap = new HashMap<String, String>();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -173,9 +173,9 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
/**
|
||||
* @return
|
||||
*/
|
||||
private Vector getDefaultOptionNames() {
|
||||
private Vector<String> getDefaultOptionNames() {
|
||||
if (defaultOptionNames == null) {
|
||||
defaultOptionNames = new Vector();
|
||||
defaultOptionNames = new Vector<String>();
|
||||
defaultOptionNames.add("Other flags"); //$NON-NLS-1$
|
||||
defaultOptionNames.add("Linker flags"); //$NON-NLS-1$
|
||||
defaultOptionNames.add("Archiver flags"); //$NON-NLS-1$
|
||||
|
@ -201,11 +201,11 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
* @param rawOptionString
|
||||
* @return Vector containing all options
|
||||
*/
|
||||
private Vector getOptionVector(String rawOptionString){
|
||||
Vector tokens = new Vector(Arrays.asList(rawOptionString.split("\\s"))); //$NON-NLS-1$
|
||||
Vector output = new Vector(tokens.size());
|
||||
private Vector<String> getOptionVector(String rawOptionString){
|
||||
Vector<String> tokens = new Vector<String>(Arrays.asList(rawOptionString.split("\\s"))); //$NON-NLS-1$
|
||||
Vector<String> output = new Vector<String>(tokens.size());
|
||||
|
||||
Iterator iter = tokens.iterator();
|
||||
Iterator<String> iter = tokens.iterator();
|
||||
while(iter.hasNext()){
|
||||
String token = (String)iter.next();
|
||||
int firstIndex = token.indexOf("\""); //$NON-NLS-1$
|
||||
|
@ -254,30 +254,25 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
String alloptions = getToolSettingsPrefStore().getString(ToolSettingsPrefStore.ALL_OPTIONS_ID);
|
||||
// list that holds the options for the option type other than
|
||||
// boolean,string and enumerated
|
||||
List optionsList = new ArrayList();
|
||||
List<String> optionsList = new ArrayList<String>();
|
||||
// additional options buffer
|
||||
StringBuffer addnOptions = new StringBuffer();
|
||||
// split all build options string
|
||||
Vector optionsArr = getOptionVector(alloptions);
|
||||
Iterator optIter = optionsArr.iterator();
|
||||
while(optIter.hasNext()) {
|
||||
String optionValue = (String)optIter.next();
|
||||
Vector<String> optionsArr = getOptionVector(alloptions);
|
||||
for (String optionValue : optionsArr) {
|
||||
boolean optionValueExist = false;
|
||||
// get the options for this tool
|
||||
IOption[] options = fTool.getOptions();
|
||||
for (int k = 0; k < options.length; ++k) {
|
||||
IOption opt = options[k];
|
||||
for (IOption opt : options) {
|
||||
//String name = opt.getId();
|
||||
// check whether the option value is "STRING" type
|
||||
Iterator stringOptsIter = stringOptionsMap.values().iterator();
|
||||
while (stringOptsIter.hasNext()) {
|
||||
if (((String) stringOptsIter.next()).indexOf(optionValue) != -1)
|
||||
for (String s : stringOptionsMap.values()) {
|
||||
if (s.indexOf(optionValue) != -1)
|
||||
optionValueExist = true;
|
||||
}
|
||||
// check whether the option value is "OBJECTS" type
|
||||
Iterator userObjsIter = userObjsMap.values().iterator();
|
||||
while (userObjsIter.hasNext()) {
|
||||
if (((String) userObjsIter.next()).indexOf(optionValue) != -1)
|
||||
for (String s : userObjsMap.values()) {
|
||||
if (s.indexOf(optionValue) != -1)
|
||||
optionValueExist = true;
|
||||
}
|
||||
// if the value does not exist in string option or user objects
|
||||
|
@ -350,9 +345,9 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
// check whether some of the "STRING" option value or "OBJECTS" type
|
||||
// option value removed
|
||||
// by the user from all build option field
|
||||
Set set = stringOptionsMap.keySet();
|
||||
for (int s = 0; s < set.size(); s++) {
|
||||
Iterator iterator = set.iterator();
|
||||
Set<String> set = stringOptionsMap.keySet();
|
||||
for (int i = 0; i < set.size(); i++) {
|
||||
Iterator<String> iterator = set.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Object key = iterator.next();
|
||||
String val = (String) stringOptionsMap.get(key);
|
||||
|
@ -369,13 +364,13 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
}
|
||||
}
|
||||
// "OBJECTS" type
|
||||
Set objSet = userObjsMap.keySet();
|
||||
Set<String> objSet = userObjsMap.keySet();
|
||||
for (int s = 0; s < objSet.size(); s++) {
|
||||
Iterator iterator = objSet.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
Object key = iterator.next();
|
||||
String val = (String) userObjsMap.get(key);
|
||||
ArrayList list = new ArrayList();
|
||||
ArrayList<String> list = new ArrayList<String>();
|
||||
String[] vals = parseString(val);
|
||||
for (int t = 0; t < vals.length; t++) {
|
||||
if (alloptions.indexOf(vals[t]) != -1)
|
||||
|
@ -397,7 +392,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
try {
|
||||
switch (opt.getValueType()) {
|
||||
case IOption.BOOLEAN :
|
||||
ArrayList optsList = new ArrayList(optionsArr);
|
||||
ArrayList<String> optsList = new ArrayList<String>(optionsArr);
|
||||
if (opt.getCommand() != null
|
||||
&& opt.getCommand().length() > 0
|
||||
&& !optsList.contains(opt.getCommand()))
|
||||
|
@ -422,7 +417,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
|||
case IOption.INCLUDE_PATH :
|
||||
case IOption.PREPROCESSOR_SYMBOLS :
|
||||
case IOption.LIBRARIES :
|
||||
ArrayList newList = new ArrayList();
|
||||
ArrayList<String> newList = new ArrayList<String>();
|
||||
for (int i = 0; i < optionsList.size(); i++) {
|
||||
if (opt.getCommand() != null
|
||||
&& ((String) optionsList.get(i)).startsWith(opt
|
||||
|
|
|
@ -126,27 +126,21 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
|||
protected void updateButtons() {
|
||||
bldr = icfg.getEditableBuilder();
|
||||
|
||||
int[] extStates = BuildBehaviourTab.calc3states(page, icfg, true);
|
||||
int[] extStates = BuildBehaviourTab.calc3states(page, icfg, 0);
|
||||
|
||||
b_genMakefileAuto.setEnabled(icfg.supportsBuild(true));
|
||||
if (extStates == null) { // no extended states available
|
||||
BuildBehaviourTab.setTriSelection(b_genMakefileAuto,
|
||||
bldr.isManagedBuildOn() ?
|
||||
BuildBehaviourTab.TRI_YES :
|
||||
BuildBehaviourTab.TRI_NO);
|
||||
bldr.isManagedBuildOn());
|
||||
BuildBehaviourTab.setTriSelection(b_useDefault,
|
||||
bldr.isDefaultBuildCmd() ?
|
||||
BuildBehaviourTab.TRI_YES :
|
||||
BuildBehaviourTab.TRI_NO);
|
||||
bldr.isDefaultBuildCmd());
|
||||
// b_expandVars.setGrayed(false);
|
||||
if(!bldr.canKeepEnvironmentVariablesInBuildfile())
|
||||
b_expandVars.setEnabled(false);
|
||||
else {
|
||||
b_expandVars.setEnabled(true);
|
||||
BuildBehaviourTab.setTriSelection(b_expandVars,
|
||||
!bldr.keepEnvironmentVariablesInBuildfile() ?
|
||||
BuildBehaviourTab.TRI_YES :
|
||||
BuildBehaviourTab.TRI_NO);
|
||||
!bldr.keepEnvironmentVariablesInBuildfile());
|
||||
}
|
||||
} else {
|
||||
BuildBehaviourTab.setTriSelection(b_genMakefileAuto, extStates[0]);
|
||||
|
@ -186,8 +180,8 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
|||
if (b_expandVars.getEnabled())
|
||||
b_expandVars.setEnabled(external && b_genMakefileAuto.getSelection());
|
||||
|
||||
if (external) {
|
||||
checkPressed(b_useDefault);
|
||||
if (external) { // just set relatet text widget state,
|
||||
checkPressed(b_useDefault, false); // do not update
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,11 +238,11 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
|||
}
|
||||
|
||||
public void checkPressed(SelectionEvent e) {
|
||||
checkPressed((Control)e.widget);
|
||||
checkPressed((Control)e.widget, true);
|
||||
updateButtons();
|
||||
}
|
||||
|
||||
private void checkPressed(Control b) {
|
||||
private void checkPressed(Control b, boolean needUpdate) {
|
||||
if (b == null) return;
|
||||
|
||||
boolean val = false;
|
||||
|
@ -263,6 +257,11 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
|||
c.setEnabled(val);
|
||||
}
|
||||
}
|
||||
// call may be used just to set text state above
|
||||
// in this case, settings update is not required
|
||||
if (! needUpdate)
|
||||
return;
|
||||
|
||||
if (b == b_useDefault) {
|
||||
setUseDefaultBuildCmd(!val);
|
||||
} else if (b == b_genMakefileAuto) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<classpathentry kind="src" path="utils.ui"/>
|
||||
<classpathentry kind="src" path="browser"/>
|
||||
<classpathentry kind="src" path="templateengine"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#Wed Nov 28 11:20:40 CET 2007
|
||||
#Thu Jan 31 11:29:21 MSK 2008
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.4
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
|
@ -16,7 +16,7 @@ org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
|||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
|
||||
|
@ -77,7 +77,7 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disa
|
|||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.4
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
|
@ -121,11 +121,9 @@ org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
|
|||
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
|
||||
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_comments=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_header=false
|
||||
org.eclipse.jdt.core.formatter.comment.format_html=true
|
||||
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
|
||||
|
|
|
@ -84,5 +84,5 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.3.0,4.0.0)",
|
|||
org.eclipse.ltk.core.refactoring,
|
||||
org.eclipse.ui.views.log;bundle-version="1.0.0"
|
||||
Eclipse-LazyStart: true
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.4
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||
Import-Package: com.ibm.icu.text
|
||||
|
|
|
@ -531,6 +531,16 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
return fFontMetrics;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets checkbox to appropriate state:
|
||||
* unchecked or checked
|
||||
* @param b - checkbox to set
|
||||
* @param state
|
||||
*/
|
||||
public static void setTriSelection(Button b, boolean state) {
|
||||
setTriSelection(b, state ? TRI_YES : TRI_NO);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets checkbox to appropriate state:
|
||||
* unchecked, checked or unknown (grayed)
|
||||
|
|
|
@ -154,7 +154,7 @@ implements
|
|||
|
||||
// tabs
|
||||
protected TabFolder folder;
|
||||
protected ArrayList itabs = new ArrayList();
|
||||
protected ArrayList<InternalTab> itabs = new ArrayList<InternalTab>();
|
||||
protected ICPropertyTab currentTab;
|
||||
|
||||
private static boolean isNewOpening = true;
|
||||
|
@ -915,7 +915,7 @@ implements
|
|||
if (folder == null) {
|
||||
if (itabs == null || itabs.size() == 0)
|
||||
return;
|
||||
ICPropertyTab t = ((InternalTab)itabs.get(0)).tab;
|
||||
ICPropertyTab t = itabs.get(0).tab;
|
||||
if (! t.canBeVisible())
|
||||
t.handleTabEvent(ICPropertyTab.VISIBLE, null);
|
||||
return;
|
||||
|
@ -925,7 +925,7 @@ implements
|
|||
int x = folder.getSelectionIndex();
|
||||
String currHeader = (x == -1) ? null : ts[x].getText();
|
||||
for (int i=0; i<itabs.size(); i++) {
|
||||
InternalTab itab = (InternalTab)itabs.get(i);
|
||||
InternalTab itab = itabs.get(i);
|
||||
TabItem ti = null;
|
||||
for (int j=0; j<ts.length; j++) {
|
||||
if (ts[j].isDisposed()) continue;
|
||||
|
@ -951,7 +951,7 @@ implements
|
|||
ts[j].dispose();
|
||||
TabItem ti = null;
|
||||
for (int i=0; i<itabs.size(); i++) {
|
||||
InternalTab itab = (InternalTab)itabs.get(i);
|
||||
InternalTab itab = itabs.get(i);
|
||||
if (itab.tab.canBeVisible()) {
|
||||
TabItem currTI = itab.createOn(folder);
|
||||
if (currHeader != null && currHeader.equals(itab.text))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2007 Intel Corporation and others
|
||||
* Copyright (c) 2005, 2008 Intel Corporation and others
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -18,10 +18,10 @@ import org.eclipse.cdt.core.model.util.CDTListComparator;
|
|||
import org.eclipse.cdt.ui.newui.AbstractExportTab.ExtData;
|
||||
import org.eclipse.cdt.ui.wizards.EntryDescriptor;
|
||||
|
||||
public class CDTUIListComparator extends CDTListComparator implements Comparator {
|
||||
private static Comparator comparator = null;
|
||||
public class CDTUIListComparator extends CDTListComparator implements Comparator<Object> {
|
||||
private static Comparator<Object> comparator = null;
|
||||
|
||||
public static Comparator getInstance() {
|
||||
public static Comparator<Object> getInstance() {
|
||||
if (comparator == null)
|
||||
comparator = new CDTUIListComparator();
|
||||
return comparator;
|
||||
|
|
Loading…
Add table
Reference in a new issue