mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 21:05:37 +02:00
parent
952046381e
commit
bb44d4020d
51 changed files with 460 additions and 396 deletions
|
@ -31,7 +31,7 @@ public interface IScannerConfigBuilderInfo2 {
|
||||||
String getSelectedProfileId();
|
String getSelectedProfileId();
|
||||||
void setSelectedProfileId(String profileId);
|
void setSelectedProfileId(String profileId);
|
||||||
|
|
||||||
List getProfileIdList();
|
List<String> getProfileIdList();
|
||||||
|
|
||||||
// SCD profile - buildOutputProvider options
|
// SCD profile - buildOutputProvider options
|
||||||
boolean isBuildOutputFileActionEnabled();
|
boolean isBuildOutputFileActionEnabled();
|
||||||
|
@ -44,7 +44,7 @@ public interface IScannerConfigBuilderInfo2 {
|
||||||
void setBuildOutputParserEnabled(boolean enable);
|
void setBuildOutputParserEnabled(boolean enable);
|
||||||
|
|
||||||
// SCD profile - scanner info provider options
|
// SCD profile - scanner info provider options
|
||||||
List getProviderIdList();
|
List<String> getProviderIdList();
|
||||||
// void addSIProvider(String providerId);
|
// void addSIProvider(String providerId);
|
||||||
// void removeSIProvider(String providerId);
|
// void removeSIProvider(String providerId);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ public interface IScannerConfigBuilderInfo2Set {
|
||||||
*
|
*
|
||||||
* @return InfoContext - to IScannerConfigBuilderInfo2 map
|
* @return InfoContext - to IScannerConfigBuilderInfo2 map
|
||||||
*/
|
*/
|
||||||
Map getInfoMap();
|
Map<InfoContext, Object> getInfoMap();
|
||||||
|
|
||||||
IScannerConfigBuilderInfo2 getInfo(InfoContext context);
|
IScannerConfigBuilderInfo2 getInfo(InfoContext context);
|
||||||
|
|
||||||
|
|
|
@ -534,9 +534,10 @@ public class ScannerConfigInfoFactory2 {
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2#getSIProviderIdList()
|
* @see org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2#getSIProviderIdList()
|
||||||
*/
|
*/
|
||||||
public List getProviderIdList() {
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<String> getProviderIdList() {
|
||||||
ProfileOptions po = (ProfileOptions) profileOptionsMap.get(selectedProfile);
|
ProfileOptions po = (ProfileOptions) profileOptionsMap.get(selectedProfile);
|
||||||
return (po != null) ? new ArrayList(po.providerOptionsMap.keySet()) : new ArrayList(0);
|
return (po != null) ? new ArrayList<String>(po.providerOptionsMap.keySet()) : new ArrayList<String>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
|
|
@ -3735,9 +3735,9 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
||||||
* Generic function for getting the list of converters for the given Build Object
|
* Generic function for getting the list of converters for the given Build Object
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static Map getConversionElements(IBuildObject buildObj) {
|
public static Map<String, IConfigurationElement> getConversionElements(IBuildObject buildObj) {
|
||||||
|
|
||||||
Map conversionTargets = new HashMap();
|
Map<String, IConfigurationElement> conversionTargets = new HashMap<String, IConfigurationElement>();
|
||||||
|
|
||||||
// Get the Converter Extension Point
|
// Get the Converter Extension Point
|
||||||
IExtensionPoint extensionPoint = Platform.getExtensionRegistry()
|
IExtensionPoint extensionPoint = Platform.getExtensionRegistry()
|
||||||
|
|
|
@ -1213,4 +1213,18 @@ public class MultiConfiguration extends MultiItemsHolder implements
|
||||||
CCorePlugin.log(e);
|
CCorePlugin.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBuildAttribute(String name, String defValue) {
|
||||||
|
String res = defValue;
|
||||||
|
IBuilder b = fCfgs[0].getBuilder();
|
||||||
|
if (b != null)
|
||||||
|
res = b.getBuildAttribute(name, defValue);
|
||||||
|
for (int i=1; i<fCfgs.length; i++) {
|
||||||
|
b = fCfgs[i].getBuilder();
|
||||||
|
if (b != null)
|
||||||
|
if (! res.equals(b.getBuildAttribute(name, defValue)))
|
||||||
|
return defValue;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -63,7 +63,7 @@ IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate, IMenuCreator {
|
||||||
private static final String DLG_TEXT = Messages.getString("BuildAllAction.6");//$NON-NLS-1$
|
private static final String DLG_TEXT = Messages.getString("BuildAllAction.6");//$NON-NLS-1$
|
||||||
private static final String DLG_TITLE = Messages.getString("BuildAllAction.7");//$NON-NLS-1$
|
private static final String DLG_TITLE = Messages.getString("BuildAllAction.7");//$NON-NLS-1$
|
||||||
|
|
||||||
protected ArrayList projects = null;
|
protected ArrayList<IProject> projects = null;
|
||||||
private ActionContributionItem it_all = null;
|
private ActionContributionItem it_all = null;
|
||||||
private ActionContributionItem it_sel = null;
|
private ActionContributionItem it_sel = null;
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate, IMenuCreator {
|
||||||
if (prjd == null) continue;
|
if (prjd == null) continue;
|
||||||
ICConfigurationDescription[] cfgds = prjd.getConfigurations();
|
ICConfigurationDescription[] cfgds = prjd.getConfigurations();
|
||||||
if (cfgds != null && cfgds.length > 0) {
|
if (cfgds != null && cfgds.length > 0) {
|
||||||
if (projects == null) projects = new ArrayList();
|
if (projects == null) projects = new ArrayList<IProject>();
|
||||||
projects.add(prj);
|
projects.add(prj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -174,12 +174,15 @@ IWorkbenchWindowPulldownDelegate2, IObjectActionDelegate, IMenuCreator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
if (projects == null || projects.isEmpty()) return;
|
if (projects == null || projects.isEmpty())
|
||||||
Iterator it = projects.iterator();
|
return;
|
||||||
|
Iterator<IProject> it = projects.iterator();
|
||||||
if (forAll) {
|
if (forAll) {
|
||||||
while(it.hasNext()) processProject((IProject)it.next());
|
while(it.hasNext())
|
||||||
|
processProject((IProject)it.next());
|
||||||
} else {
|
} else {
|
||||||
if (it.hasNext()) processProject((IProject)it.next());
|
if (it.hasNext())
|
||||||
|
processProject((IProject)it.next());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2007 Texas Instruments Incorporated and others.
|
* Copyright (c) 2006, 2008 Texas Instruments Incorporated and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -147,9 +147,9 @@ public class BuildFilesAction extends ActionDelegate implements
|
||||||
*
|
*
|
||||||
* @return a list of resources
|
* @return a list of resources
|
||||||
*/
|
*/
|
||||||
private List getSelectedBuildableFiles() {
|
private List<IFile> getSelectedBuildableFiles() {
|
||||||
|
|
||||||
List files = new LinkedList();
|
List<IFile> files = new LinkedList<IFile>();
|
||||||
|
|
||||||
ISelectionService selectionService = workbenchWindow
|
ISelectionService selectionService = workbenchWindow
|
||||||
.getSelectionService();
|
.getSelectionService();
|
||||||
|
@ -157,7 +157,7 @@ public class BuildFilesAction extends ActionDelegate implements
|
||||||
|
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
|
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
|
||||||
for (Iterator elements = structuredSelection.iterator(); elements
|
for (Iterator<?> elements = structuredSelection.iterator(); elements
|
||||||
.hasNext();) {
|
.hasNext();) {
|
||||||
IFile file = convertToIFile(elements.next());
|
IFile file = convertToIFile(elements.next());
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
|
@ -182,9 +182,9 @@ public class BuildFilesAction extends ActionDelegate implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class BuildFilesJob extends Job {
|
private static final class BuildFilesJob extends Job {
|
||||||
private final List files;
|
private final List<IFile> files;
|
||||||
|
|
||||||
BuildFilesJob(List filesToBuild) {
|
BuildFilesJob(List<IFile> filesToBuild) {
|
||||||
super(
|
super(
|
||||||
ManagedMakeMessages
|
ManagedMakeMessages
|
||||||
.getResourceString("BuildFilesAction.buildingSelectedFiles")); //$NON-NLS-1$
|
.getResourceString("BuildFilesAction.buildingSelectedFiles")); //$NON-NLS-1$
|
||||||
|
@ -197,7 +197,7 @@ public class BuildFilesAction extends ActionDelegate implements
|
||||||
*/
|
*/
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
|
|
||||||
Iterator iterator = files.iterator();
|
Iterator<IFile> iterator = files.iterator();
|
||||||
|
|
||||||
GeneratedMakefileBuilder builder = new GeneratedMakefileBuilder();
|
GeneratedMakefileBuilder builder = new GeneratedMakefileBuilder();
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ public class BuildFilesAction extends ActionDelegate implements
|
||||||
*/
|
*/
|
||||||
public void run(IAction action) {
|
public void run(IAction action) {
|
||||||
|
|
||||||
List selectedFiles = getSelectedBuildableFiles();
|
List<IFile> selectedFiles = getSelectedBuildableFiles();
|
||||||
|
|
||||||
Job buildFilesJob = new BuildFilesJob(selectedFiles);
|
Job buildFilesJob = new BuildFilesJob(selectedFiles);
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ public class BuildFilesAction extends ActionDelegate implements
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Iterator elements = structuredSelection.iterator(); elements
|
for (Iterator<?> elements = structuredSelection.iterator(); elements
|
||||||
.hasNext();) {
|
.hasNext();) {
|
||||||
IFile file = convertToIFile(elements.next());
|
IFile file = convertToIFile(elements.next());
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2007 Texas Instruments Incorporated and others.
|
* Copyright (c) 2006, 2008 Texas Instruments Incorporated and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -147,9 +147,9 @@ public class CleanFilesAction extends ActionDelegate implements
|
||||||
*
|
*
|
||||||
* @return a list of resources
|
* @return a list of resources
|
||||||
*/
|
*/
|
||||||
private List getSelectedBuildableFiles() {
|
private List<IFile> getSelectedBuildableFiles() {
|
||||||
|
|
||||||
List files = new LinkedList();
|
List<IFile> files = new LinkedList<IFile>();
|
||||||
|
|
||||||
ISelectionService selectionService = workbenchWindow
|
ISelectionService selectionService = workbenchWindow
|
||||||
.getSelectionService();
|
.getSelectionService();
|
||||||
|
@ -157,7 +157,7 @@ public class CleanFilesAction extends ActionDelegate implements
|
||||||
|
|
||||||
if (selection instanceof IStructuredSelection) {
|
if (selection instanceof IStructuredSelection) {
|
||||||
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
|
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
|
||||||
for (Iterator elements = structuredSelection.iterator(); elements
|
for (Iterator<?> elements = structuredSelection.iterator(); elements
|
||||||
.hasNext();) {
|
.hasNext();) {
|
||||||
IFile file = convertToIFile(elements.next());
|
IFile file = convertToIFile(elements.next());
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
|
@ -180,11 +180,11 @@ public class CleanFilesAction extends ActionDelegate implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class CleanFilesJob extends Job {
|
private static final class CleanFilesJob extends Job {
|
||||||
private final List files;
|
private final List<IFile> files;
|
||||||
|
|
||||||
protected Vector generationProblems;
|
protected Vector<?> generationProblems;
|
||||||
|
|
||||||
private CleanFilesJob(String name, List filesToBuild) {
|
private CleanFilesJob(String name, List<IFile> filesToBuild) {
|
||||||
super(name);
|
super(name);
|
||||||
files = filesToBuild;
|
files = filesToBuild;
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,7 @@ public class CleanFilesAction extends ActionDelegate implements
|
||||||
ManagedMakeMessages
|
ManagedMakeMessages
|
||||||
.getResourceString("CleanFilesAction.cleaningFiles"), files.size()); //$NON-NLS-1$
|
.getResourceString("CleanFilesAction.cleaningFiles"), files.size()); //$NON-NLS-1$
|
||||||
|
|
||||||
Iterator iterator = files.iterator();
|
Iterator<IFile> iterator = files.iterator();
|
||||||
|
|
||||||
// clean each file
|
// clean each file
|
||||||
while (iterator.hasNext() && !monitor.isCanceled()) {
|
while (iterator.hasNext() && !monitor.isCanceled()) {
|
||||||
|
@ -254,7 +254,7 @@ public class CleanFilesAction extends ActionDelegate implements
|
||||||
*/
|
*/
|
||||||
public void run(IAction action) {
|
public void run(IAction action) {
|
||||||
|
|
||||||
List selectedFiles = getSelectedBuildableFiles();
|
List<IFile> selectedFiles = getSelectedBuildableFiles();
|
||||||
|
|
||||||
CleanFilesJob job = new CleanFilesJob(
|
CleanFilesJob job = new CleanFilesJob(
|
||||||
ManagedMakeMessages
|
ManagedMakeMessages
|
||||||
|
@ -288,7 +288,7 @@ public class CleanFilesAction extends ActionDelegate implements
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Iterator elements = structuredSelection.iterator(); elements
|
for (Iterator<?> elements = structuredSelection.iterator(); elements
|
||||||
.hasNext();) {
|
.hasNext();) {
|
||||||
IFile file = convertToIFile(elements.next());
|
IFile file = convertToIFile(elements.next());
|
||||||
if (file != null) {
|
if (file != null) {
|
||||||
|
|
|
@ -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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -43,7 +43,7 @@ public class ConvertTargetDialog extends Dialog {
|
||||||
final private String title;
|
final private String title;
|
||||||
protected List convertersList;
|
protected List convertersList;
|
||||||
private IProject project;
|
private IProject project;
|
||||||
private Map conversionElements;
|
private Map<String, IConfigurationElement> conversionElements;
|
||||||
private IConfigurationElement selectedConversionElement;
|
private IConfigurationElement selectedConversionElement;
|
||||||
private static boolean isConversionSuccessful = false;
|
private static boolean isConversionSuccessful = false;
|
||||||
|
|
||||||
|
@ -173,9 +173,9 @@ public class ConvertTargetDialog extends Dialog {
|
||||||
b.setEnabled(convertersList.getSelectionIndex() != -1);
|
b.setEnabled(convertersList.getSelectionIndex() != -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map getConversionElements() {
|
private Map<String, IConfigurationElement> getConversionElements() {
|
||||||
if (conversionElements == null) {
|
if (conversionElements == null) {
|
||||||
conversionElements = new HashMap();
|
conversionElements = new HashMap<String, IConfigurationElement>();
|
||||||
}
|
}
|
||||||
return conversionElements;
|
return conversionElements;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -46,6 +46,7 @@ public class ArtifactTab extends AbstractCBuildPropertyTab {
|
||||||
private IBuildObjectProperties fProperties;
|
private IBuildObjectProperties fProperties;
|
||||||
private IBuildPropertyValue[] values;
|
private IBuildPropertyValue[] values;
|
||||||
private ITool tTool;
|
private ITool tTool;
|
||||||
|
private boolean canModify = true;
|
||||||
|
|
||||||
public void createControls(Composite parent) {
|
public void createControls(Composite parent) {
|
||||||
super.createControls(parent);
|
super.createControls(parent);
|
||||||
|
@ -68,7 +69,8 @@ public class ArtifactTab extends AbstractCBuildPropertyTab {
|
||||||
t2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
t2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
t2.addModifyListener(new ModifyListener() {
|
t2.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
fCfg.setArtifactName(t2.getText());
|
if (canModify)
|
||||||
|
fCfg.setArtifactName(t2.getText());
|
||||||
}} );
|
}} );
|
||||||
Label l3 = new Label(usercomp, SWT.NONE);
|
Label l3 = new Label(usercomp, SWT.NONE);
|
||||||
l3.setLayoutData(new GridData(GridData.BEGINNING));
|
l3.setLayoutData(new GridData(GridData.BEGINNING));
|
||||||
|
@ -77,7 +79,8 @@ public class ArtifactTab extends AbstractCBuildPropertyTab {
|
||||||
t3.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
t3.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
t3.addModifyListener(new ModifyListener() {
|
t3.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
fCfg.setArtifactExtension(t3.getText());
|
if (canModify)
|
||||||
|
fCfg.setArtifactExtension(t3.getText());
|
||||||
}} );
|
}} );
|
||||||
|
|
||||||
l4 = new Label(usercomp, SWT.NONE);
|
l4 = new Label(usercomp, SWT.NONE);
|
||||||
|
@ -87,11 +90,12 @@ public class ArtifactTab extends AbstractCBuildPropertyTab {
|
||||||
t4.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
t4.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
t4.addModifyListener(new ModifyListener() {
|
t4.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
if(tTool != null)
|
if (canModify) {
|
||||||
tTool.setOutputPrefixForPrimaryOutput(t4.getText());
|
if(tTool != null)
|
||||||
else if (fCfg instanceof IMultiConfiguration)
|
tTool.setOutputPrefixForPrimaryOutput(t4.getText());
|
||||||
((IMultiConfiguration)fCfg).setOutputPrefixForPrimaryOutput(t4.getText());
|
else if (fCfg instanceof IMultiConfiguration)
|
||||||
|
((IMultiConfiguration)fCfg).setOutputPrefixForPrimaryOutput(t4.getText());
|
||||||
|
}
|
||||||
}} );
|
}} );
|
||||||
updateData(getResDesc());
|
updateData(getResDesc());
|
||||||
}
|
}
|
||||||
|
@ -145,31 +149,40 @@ public class ArtifactTab extends AbstractCBuildPropertyTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
String s = fCfg.getArtifactName();
|
String s = fCfg.getArtifactName();
|
||||||
if (s == null || s.trim().length() == 0) {
|
if (! page.isMultiCfg() && (s == null || s.trim().length() == 0)) {
|
||||||
s = getResDesc().getConfiguration().getProjectDescription().getName();
|
s = getResDesc().getConfiguration().getProjectDescription().getName();
|
||||||
getCfg().setArtifactName(CWizardHandler.removeSpaces(s));
|
getCfg().setArtifactName(CWizardHandler.removeSpaces(s));
|
||||||
}
|
}
|
||||||
t2.setText(s);
|
|
||||||
|
|
||||||
|
canModify = false;
|
||||||
|
|
||||||
|
t2.setText(s);
|
||||||
t3.setText(fCfg.getArtifactExtension());
|
t3.setText(fCfg.getArtifactExtension());
|
||||||
|
|
||||||
tTool = fCfg.calculateTargetTool();
|
if (page.isMultiCfg()) {
|
||||||
if(tTool != null){
|
if (l4 != null)
|
||||||
if (l4 != null) l4.setVisible(true);
|
l4.setVisible(true);
|
||||||
if (t4 != null) {
|
|
||||||
t4.setVisible(true);
|
|
||||||
t4.setText(tTool.getOutputPrefix());
|
|
||||||
}
|
|
||||||
} else if (page.isMultiCfg()) {
|
|
||||||
if (l4 != null) l4.setVisible(true);
|
|
||||||
if (t4 != null) {
|
if (t4 != null) {
|
||||||
t4.setVisible(true);
|
t4.setVisible(true);
|
||||||
t4.setText(((IMultiConfiguration)fCfg).getToolOutputPrefix());
|
t4.setText(((IMultiConfiguration)fCfg).getToolOutputPrefix());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (l4 != null) l4.setVisible(false);
|
tTool = fCfg.calculateTargetTool();
|
||||||
if (t4 != null) t4.setVisible(false);
|
if(tTool != null){
|
||||||
|
if (l4 != null)
|
||||||
|
l4.setVisible(true);
|
||||||
|
if (t4 != null) {
|
||||||
|
t4.setVisible(true);
|
||||||
|
t4.setText(tTool.getOutputPrefix());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (l4 != null)
|
||||||
|
l4.setVisible(false);
|
||||||
|
if (t4 != null)
|
||||||
|
t4.setVisible(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
canModify = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void performApply(ICResourceDescription src, ICResourceDescription dst) {
|
public void performApply(ICResourceDescription src, ICResourceDescription dst) {
|
||||||
|
|
|
@ -18,6 +18,7 @@ import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
|
import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildProcessManager;
|
import org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildProcessManager;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
||||||
|
import org.eclipse.cdt.managedbuilder.internal.core.MultiConfiguration;
|
||||||
import org.eclipse.cdt.newmake.core.IMakeBuilderInfo;
|
import org.eclipse.cdt.newmake.core.IMakeBuilderInfo;
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
||||||
|
@ -64,6 +65,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
|
|
||||||
private IBuilder bldr;
|
private IBuilder bldr;
|
||||||
private IConfiguration icfg;
|
private IConfiguration icfg;
|
||||||
|
private boolean canModify = true;
|
||||||
|
|
||||||
protected final int cpuNumber = BuildProcessManager.checkCPUNumber();
|
protected final int cpuNumber = BuildProcessManager.checkCPUNumber();
|
||||||
|
|
||||||
|
@ -153,7 +155,8 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
t_autoBuild = setupBlock(g4, b_autoBuild);
|
t_autoBuild = setupBlock(g4, b_autoBuild);
|
||||||
t_autoBuild.addModifyListener(new ModifyListener() {
|
t_autoBuild.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_AUTO, t_autoBuild.getText());
|
if (canModify)
|
||||||
|
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_AUTO, t_autoBuild.getText());
|
||||||
}} );
|
}} );
|
||||||
t_autoBuild.getAccessible().addAccessibleListener(makeTargetLabelAccessibleListener);
|
t_autoBuild.getAccessible().addAccessibleListener(makeTargetLabelAccessibleListener);
|
||||||
setupLabel(g4, Messages.getString("BuilderSettingsTab.18"), 3, GridData.BEGINNING); //$NON-NLS-1$
|
setupLabel(g4, Messages.getString("BuilderSettingsTab.18"), 3, GridData.BEGINNING); //$NON-NLS-1$
|
||||||
|
@ -161,14 +164,16 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
t_cmdBuild = setupBlock(g4, b_cmdBuild);
|
t_cmdBuild = setupBlock(g4, b_cmdBuild);
|
||||||
t_cmdBuild.addModifyListener(new ModifyListener() {
|
t_cmdBuild.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_INCREMENTAL, t_cmdBuild.getText());
|
if (canModify)
|
||||||
|
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_INCREMENTAL, t_cmdBuild.getText());
|
||||||
}} );
|
}} );
|
||||||
t_cmdBuild.getAccessible().addAccessibleListener(makeTargetLabelAccessibleListener);
|
t_cmdBuild.getAccessible().addAccessibleListener(makeTargetLabelAccessibleListener);
|
||||||
b_cmdClean = setupCheck(g4, Messages.getString("BuilderSettingsTab.20"), 1, GridData.BEGINNING); //$NON-NLS-1$
|
b_cmdClean = setupCheck(g4, Messages.getString("BuilderSettingsTab.20"), 1, GridData.BEGINNING); //$NON-NLS-1$
|
||||||
t_cmdClean = setupBlock(g4, b_cmdClean);
|
t_cmdClean = setupBlock(g4, b_cmdClean);
|
||||||
t_cmdClean.addModifyListener(new ModifyListener() {
|
t_cmdClean.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_CLEAN, t_cmdClean.getText());
|
if (canModify)
|
||||||
|
setBuildAttribute(IMakeBuilderInfo.BUILD_TARGET_CLEAN, t_cmdClean.getText());
|
||||||
}} );
|
}} );
|
||||||
t_cmdClean.getAccessible().addAccessibleListener(makeTargetLabelAccessibleListener);
|
t_cmdClean.getAccessible().addAccessibleListener(makeTargetLabelAccessibleListener);
|
||||||
}
|
}
|
||||||
|
@ -242,7 +247,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
*/
|
*/
|
||||||
protected void updateButtons() {
|
protected void updateButtons() {
|
||||||
bldr = icfg.getEditableBuilder();
|
bldr = icfg.getEditableBuilder();
|
||||||
|
canModify = false;
|
||||||
int[] extStates = calc3states(page, icfg, 1);
|
int[] extStates = calc3states(page, icfg, 1);
|
||||||
|
|
||||||
if (extStates != null) {
|
if (extStates != null) {
|
||||||
|
@ -290,9 +295,17 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
b_parallelNum.setSelection(!getParallelDef(icfg));
|
b_parallelNum.setSelection(!getParallelDef(icfg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
t_autoBuild.setText(bldr.getBuildAttribute(IBuilder.BUILD_TARGET_AUTO, EMPTY_STR));
|
|
||||||
t_cmdBuild.setText(bldr.getBuildAttribute(IBuilder.BUILD_TARGET_INCREMENTAL, EMPTY_STR));
|
if (page.isMultiCfg()) {
|
||||||
t_cmdClean.setText(bldr.getBuildAttribute(IBuilder.BUILD_TARGET_CLEAN, EMPTY_STR));
|
MultiConfiguration mc = (MultiConfiguration)icfg;
|
||||||
|
t_autoBuild.setText(mc.getBuildAttribute(IBuilder.BUILD_TARGET_AUTO, EMPTY_STR));
|
||||||
|
t_cmdBuild.setText(mc.getBuildAttribute(IBuilder.BUILD_TARGET_INCREMENTAL, EMPTY_STR));
|
||||||
|
t_cmdClean.setText(mc.getBuildAttribute(IBuilder.BUILD_TARGET_CLEAN, EMPTY_STR));
|
||||||
|
} else {
|
||||||
|
t_autoBuild.setText(bldr.getBuildAttribute(IBuilder.BUILD_TARGET_AUTO, EMPTY_STR));
|
||||||
|
t_cmdBuild.setText(bldr.getBuildAttribute(IBuilder.BUILD_TARGET_INCREMENTAL, EMPTY_STR));
|
||||||
|
t_cmdClean.setText(bldr.getBuildAttribute(IBuilder.BUILD_TARGET_CLEAN, EMPTY_STR));
|
||||||
|
}
|
||||||
|
|
||||||
boolean external = ! isInternalBuilderEnabled();
|
boolean external = ! isInternalBuilderEnabled();
|
||||||
boolean parallel = b_parallel.getSelection();
|
boolean parallel = b_parallel.getSelection();
|
||||||
|
@ -314,6 +327,7 @@ public class BuildBehaviourTab extends AbstractCBuildPropertyTab {
|
||||||
checkPressed(b_cmdBuild, false);
|
checkPressed(b_cmdBuild, false);
|
||||||
checkPressed(b_cmdClean, false);
|
checkPressed(b_cmdClean, false);
|
||||||
}
|
}
|
||||||
|
canModify = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -39,15 +39,16 @@ import org.eclipse.swt.widgets.Text;
|
||||||
|
|
||||||
|
|
||||||
public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
||||||
Combo combo;
|
private Combo combo;
|
||||||
Text preCmd;
|
private Text preCmd;
|
||||||
Text preDes;
|
private Text preDes;
|
||||||
Text postCmd;
|
private Text postCmd;
|
||||||
Text postDes;
|
private Text postDes;
|
||||||
ITool tool;
|
private ITool tool;
|
||||||
IConfiguration config;
|
private IConfiguration config;
|
||||||
ICResourceDescription cfgdescr;
|
private ICResourceDescription cfgdescr;
|
||||||
IFileInfo rcfg;
|
private IFileInfo rcfg;
|
||||||
|
private boolean canModify = true;
|
||||||
|
|
||||||
private static final String label1 = Messages.getString("BuildStepsTab.0"); //$NON-NLS-1$
|
private static final String label1 = Messages.getString("BuildStepsTab.0"); //$NON-NLS-1$
|
||||||
private static final String label2 = Messages.getString("BuildStepsTab.1"); //$NON-NLS-1$
|
private static final String label2 = Messages.getString("BuildStepsTab.1"); //$NON-NLS-1$
|
||||||
|
@ -94,14 +95,18 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
||||||
preCmd = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
preCmd = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
||||||
preCmd.addModifyListener(new ModifyListener() {
|
preCmd.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
getCfg().setPrebuildStep(preCmd.getText());
|
if (canModify &&
|
||||||
|
!preCmd.getText().equals(getCfg().getPrebuildStep()))
|
||||||
|
getCfg().setPrebuildStep(preCmd.getText());
|
||||||
}});
|
}});
|
||||||
|
|
||||||
setupLabel(g1, label2, 1, GridData.BEGINNING);
|
setupLabel(g1, label2, 1, GridData.BEGINNING);
|
||||||
preDes = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
preDes = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
||||||
preDes.addModifyListener(new ModifyListener() {
|
preDes.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
getCfg().setPreannouncebuildStep(preDes.getText());
|
if (canModify &&
|
||||||
|
!preDes.getText().equals(getCfg().getPreannouncebuildStep()))
|
||||||
|
getCfg().setPreannouncebuildStep(preDes.getText());
|
||||||
}});
|
}});
|
||||||
|
|
||||||
Group g2 = setupGroup (usercomp, Messages.getString("BuildStepsTab.3"), 1, GridData.FILL_HORIZONTAL); //$NON-NLS-1$
|
Group g2 = setupGroup (usercomp, Messages.getString("BuildStepsTab.3"), 1, GridData.FILL_HORIZONTAL); //$NON-NLS-1$
|
||||||
|
@ -109,14 +114,18 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
||||||
postCmd = setupText(g2, 1, GridData.FILL_HORIZONTAL);
|
postCmd = setupText(g2, 1, GridData.FILL_HORIZONTAL);
|
||||||
postCmd.addModifyListener(new ModifyListener() {
|
postCmd.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
getCfg().setPostbuildStep(postCmd.getText());
|
if (canModify &&
|
||||||
|
!postCmd.getText().equals(getCfg().getPostbuildStep()))
|
||||||
|
getCfg().setPostbuildStep(postCmd.getText());
|
||||||
}});
|
}});
|
||||||
|
|
||||||
setupLabel(g2, label2, 1, GridData.BEGINNING);
|
setupLabel(g2, label2, 1, GridData.BEGINNING);
|
||||||
postDes = setupText(g2, 1, GridData.FILL_HORIZONTAL);
|
postDes = setupText(g2, 1, GridData.FILL_HORIZONTAL);
|
||||||
postDes.addModifyListener(new ModifyListener() {
|
postDes.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
getCfg().setPostannouncebuildStep(postDes.getText());
|
if (canModify &&
|
||||||
|
!postDes.getText().equals(getCfg().getPostannouncebuildStep()))
|
||||||
|
getCfg().setPostannouncebuildStep(postDes.getText());
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,9 +147,10 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
||||||
preCmd = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
preCmd = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
||||||
preCmd.addModifyListener(new ModifyListener() {
|
preCmd.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
if (page.isForProject())
|
// if (page.isForProject())
|
||||||
getCfg().setPrebuildStep(preCmd.getText());
|
// getCfg().setPrebuildStep(preCmd.getText());
|
||||||
else {
|
// else
|
||||||
|
if (canModify && tool != null) {
|
||||||
IInputType[] ein = tool.getInputTypes();
|
IInputType[] ein = tool.getInputTypes();
|
||||||
if (ein != null && ein.length > 0) {
|
if (ein != null && ein.length > 0) {
|
||||||
IAdditionalInput[] add = ein[0].getAdditionalInputs();
|
IAdditionalInput[] add = ein[0].getAdditionalInputs();
|
||||||
|
@ -155,9 +165,10 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
||||||
preDes = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
preDes = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
||||||
preDes.addModifyListener(new ModifyListener() {
|
preDes.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
if (page.isForProject())
|
// if (page.isForProject())
|
||||||
getCfg().setPreannouncebuildStep(preDes.getText());
|
// getCfg().setPreannouncebuildStep(preDes.getText());
|
||||||
else {
|
// else {
|
||||||
|
if (canModify && tool != null) {
|
||||||
IOutputType[] out = tool.getOutputTypes();
|
IOutputType[] out = tool.getOutputTypes();
|
||||||
if (valid(out))
|
if (valid(out))
|
||||||
out[0].setOutputNames(preDes.getText());
|
out[0].setOutputNames(preDes.getText());
|
||||||
|
@ -168,9 +179,10 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
||||||
postCmd = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
postCmd = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
||||||
postCmd.addModifyListener(new ModifyListener() {
|
postCmd.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
if (page.isForProject())
|
// if (page.isForProject())
|
||||||
getCfg().setPostbuildStep(postCmd.getText());
|
// getCfg().setPostbuildStep(postCmd.getText());
|
||||||
else
|
// else
|
||||||
|
if (canModify && tool != null)
|
||||||
tool.setToolCommand(postCmd.getText());
|
tool.setToolCommand(postCmd.getText());
|
||||||
}});
|
}});
|
||||||
|
|
||||||
|
@ -178,9 +190,10 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
||||||
postDes = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
postDes = setupText(g1, 1, GridData.FILL_HORIZONTAL);
|
||||||
postDes.addModifyListener(new ModifyListener() {
|
postDes.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
if (page.isForProject())
|
// if (page.isForProject())
|
||||||
getCfg().setPostannouncebuildStep(postDes.getText());
|
// getCfg().setPostannouncebuildStep(postDes.getText());
|
||||||
else
|
// else
|
||||||
|
if (canModify && tool != null)
|
||||||
tool.setAnnouncement(postDes.getText());
|
tool.setAnnouncement(postDes.getText());
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
|
@ -193,6 +206,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void update() {
|
private void update() {
|
||||||
|
canModify = false; // avoid changing
|
||||||
if (page.isForProject()) {
|
if (page.isForProject()) {
|
||||||
preCmd.setText(config.getPrebuildStep());
|
preCmd.setText(config.getPrebuildStep());
|
||||||
preDes.setText(config.getPreannouncebuildStep());
|
preDes.setText(config.getPreannouncebuildStep());
|
||||||
|
@ -227,6 +241,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
|
||||||
postDes.setText(EMPTY_STR);
|
postDes.setText(EMPTY_STR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
canModify = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private ITool getRcbsTool(IFileInfo rcConfig){
|
private ITool getRcbsTool(IFileInfo rcConfig){
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2007 IBM Corporation and others.
|
* Copyright (c) 2004, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -101,7 +101,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
||||||
|
|
||||||
private ITool fTool;
|
private ITool fTool;
|
||||||
// Map that holds all user object options and its values
|
// Map that holds all user object options and its values
|
||||||
private HashMap<String, String> userObjsMap;
|
private HashMap<IOption, String> userObjsMap;
|
||||||
|
|
||||||
public BuildToolSettingUI(AbstractCBuildPropertyTab page,
|
public BuildToolSettingUI(AbstractCBuildPropertyTab page,
|
||||||
IResourceInfo info, ITool _tool) {
|
IResourceInfo info, ITool _tool) {
|
||||||
|
@ -111,7 +111,7 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
||||||
this.fTool = _tool;
|
this.fTool = _tool;
|
||||||
buildPropPage = page;
|
buildPropPage = page;
|
||||||
stringOptionsMap = new HashMap<String, String>();
|
stringOptionsMap = new HashMap<String, String>();
|
||||||
userObjsMap = new HashMap<String, String>();
|
userObjsMap = new HashMap<IOption, String>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -364,21 +364,18 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// "OBJECTS" type
|
// "OBJECTS" type
|
||||||
Set<String> objSet = userObjsMap.keySet();
|
Set<IOption> objSet = userObjsMap.keySet();
|
||||||
for (int s = 0; s < objSet.size(); s++) {
|
for (int s = 0; s < objSet.size(); s++) {
|
||||||
Iterator iterator = objSet.iterator();
|
for (IOption op : objSet) {
|
||||||
while (iterator.hasNext()) {
|
String val = (String) userObjsMap.get(op);
|
||||||
Object key = iterator.next();
|
|
||||||
String val = (String) userObjsMap.get(key);
|
|
||||||
ArrayList<String> list = new ArrayList<String>();
|
ArrayList<String> list = new ArrayList<String>();
|
||||||
String[] vals = parseString(val);
|
for (String v : parseString(val)) {
|
||||||
for (int t = 0; t < vals.length; t++) {
|
if (alloptions.indexOf(v) != -1)
|
||||||
if (alloptions.indexOf(vals[t]) != -1)
|
list.add(v);
|
||||||
list.add(vals[t]);
|
|
||||||
}
|
}
|
||||||
String listArr[] = new String[list.size()];
|
String listArr[] = new String[list.size()];
|
||||||
list.toArray(listArr);
|
list.toArray(listArr);
|
||||||
setOption(((IOption) key), listArr);
|
setOption(op, listArr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Now update the preference store with parsed options
|
// Now update the preference store with parsed options
|
||||||
|
@ -418,12 +415,10 @@ public class BuildToolSettingUI extends AbstractToolSettingUI {
|
||||||
case IOption.PREPROCESSOR_SYMBOLS :
|
case IOption.PREPROCESSOR_SYMBOLS :
|
||||||
case IOption.LIBRARIES :
|
case IOption.LIBRARIES :
|
||||||
ArrayList<String> newList = new ArrayList<String>();
|
ArrayList<String> newList = new ArrayList<String>();
|
||||||
for (int i = 0; i < optionsList.size(); i++) {
|
for (String s : optionsList) {
|
||||||
if (opt.getCommand() != null
|
if (opt.getCommand() != null
|
||||||
&& ((String) optionsList.get(i)).startsWith(opt
|
&& s.startsWith(opt.getCommand())) {
|
||||||
.getCommand())) {
|
newList.add(s.substring(opt.getCommand().length()));
|
||||||
newList.add(((String) optionsList.get(i))
|
|
||||||
.substring(opt.getCommand().length()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String[] strlist = new String[newList.size()];
|
String[] strlist = new String[newList.size()];
|
||||||
|
|
|
@ -17,6 +17,7 @@ import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
|
import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.Builder;
|
import org.eclipse.cdt.managedbuilder.internal.core.Builder;
|
||||||
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
import org.eclipse.cdt.managedbuilder.internal.core.Configuration;
|
||||||
|
import org.eclipse.cdt.managedbuilder.internal.core.MultiConfiguration;
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
import org.eclipse.cdt.ui.newui.AbstractCPropertyTab;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
@ -55,6 +56,7 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
||||||
|
|
||||||
private IBuilder bldr;
|
private IBuilder bldr;
|
||||||
private IConfiguration icfg;
|
private IConfiguration icfg;
|
||||||
|
private boolean canModify = true;
|
||||||
|
|
||||||
public void createControls(Composite parent) {
|
public void createControls(Composite parent) {
|
||||||
super.createControls(parent);
|
super.createControls(parent);
|
||||||
|
@ -79,6 +81,8 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
||||||
t_buildCmd = setupBlock(g1, b_useDefault);
|
t_buildCmd = setupBlock(g1, b_useDefault);
|
||||||
t_buildCmd.addModifyListener(new ModifyListener() {
|
t_buildCmd.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
|
if (! canModify)
|
||||||
|
return;
|
||||||
String fullCommand = t_buildCmd.getText().trim();
|
String fullCommand = t_buildCmd.getText().trim();
|
||||||
String buildCommand = parseMakeCommand(fullCommand);
|
String buildCommand = parseMakeCommand(fullCommand);
|
||||||
String buildArgs = fullCommand.substring(buildCommand.length()).trim();
|
String buildArgs = fullCommand.substring(buildCommand.length()).trim();
|
||||||
|
@ -101,7 +105,8 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
||||||
t_dir = setupText(group_dir, 1, GridData.FILL_HORIZONTAL);
|
t_dir = setupText(group_dir, 1, GridData.FILL_HORIZONTAL);
|
||||||
t_dir.addModifyListener(new ModifyListener() {
|
t_dir.addModifyListener(new ModifyListener() {
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
setBuildPath(t_dir.getText());
|
if (canModify)
|
||||||
|
setBuildPath(t_dir.getText());
|
||||||
}} );
|
}} );
|
||||||
Composite c = new Composite(group_dir, SWT.NONE);
|
Composite c = new Composite(group_dir, SWT.NONE);
|
||||||
setupControl(c, 2, GridData.FILL_HORIZONTAL);
|
setupControl(c, 2, GridData.FILL_HORIZONTAL);
|
||||||
|
@ -126,6 +131,7 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
||||||
protected void updateButtons() {
|
protected void updateButtons() {
|
||||||
bldr = icfg.getEditableBuilder();
|
bldr = icfg.getEditableBuilder();
|
||||||
|
|
||||||
|
canModify = false; // avoid extra update from modifyListeners
|
||||||
int[] extStates = BuildBehaviourTab.calc3states(page, icfg, 0);
|
int[] extStates = BuildBehaviourTab.calc3states(page, icfg, 0);
|
||||||
|
|
||||||
b_genMakefileAuto.setEnabled(icfg.supportsBuild(true));
|
b_genMakefileAuto.setEnabled(icfg.supportsBuild(true));
|
||||||
|
@ -183,6 +189,7 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
||||||
if (external) { // just set relatet text widget state,
|
if (external) { // just set relatet text widget state,
|
||||||
checkPressed(b_useDefault, false); // do not update
|
checkPressed(b_useDefault, false); // do not update
|
||||||
}
|
}
|
||||||
|
canModify = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Button setupBottomButton(Composite c, String name) {
|
Button setupBottomButton(Composite c, String name) {
|
||||||
|
@ -384,7 +391,7 @@ public class BuilderSettingsTab extends AbstractCBuildPropertyTab {
|
||||||
if (icfg instanceof Configuration)
|
if (icfg instanceof Configuration)
|
||||||
return ((Configuration)icfg).isInternalBuilderEnabled();
|
return ((Configuration)icfg).isInternalBuilderEnabled();
|
||||||
if (icfg instanceof IMultiConfiguration)
|
if (icfg instanceof IMultiConfiguration)
|
||||||
return ((IMultiConfiguration)icfg).isInternalBuilderEnabled();
|
return ((MultiConfiguration)icfg).isInternalBuilderEnabled();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.managedbuilder.ui.properties;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -82,11 +81,11 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
private Group scGroup;
|
private Group scGroup;
|
||||||
|
|
||||||
private ICfgScannerConfigBuilderInfo2Set cbi;
|
private ICfgScannerConfigBuilderInfo2Set cbi;
|
||||||
private Map baseInfoMap;
|
private Map<InfoContext, Object> baseInfoMap;
|
||||||
private IScannerConfigBuilderInfo2 buildInfo;
|
private IScannerConfigBuilderInfo2 buildInfo;
|
||||||
private CfgInfoContext iContext;
|
private CfgInfoContext iContext;
|
||||||
private List pagesList = null;
|
private List<DiscoveryProfilePageConfiguration> pagesList = null;
|
||||||
private List visibleProfilesList = null;
|
private List<String> visibleProfilesList = null;
|
||||||
private IPath configPath;
|
private IPath configPath;
|
||||||
private AbstractDiscoveryPage[] realPages;
|
private AbstractDiscoveryPage[] realPages;
|
||||||
protected SashForm sashForm;
|
protected SashForm sashForm;
|
||||||
|
@ -172,7 +171,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
profileComboBox.addSelectionListener(new SelectionAdapter() {
|
profileComboBox.addSelectionListener(new SelectionAdapter() {
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
int x = profileComboBox.getSelectionIndex();
|
int x = profileComboBox.getSelectionIndex();
|
||||||
String s = (String)visibleProfilesList.get(x);
|
String s = visibleProfilesList.get(x);
|
||||||
buildInfo.setSelectedProfileId(s);
|
buildInfo.setSelectedProfileId(s);
|
||||||
handleDiscoveryProfileChanged();
|
handleDiscoveryProfileChanged();
|
||||||
}
|
}
|
||||||
|
@ -188,10 +187,10 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
|
|
||||||
public void updateData(ICResourceDescription rcfg) {
|
public void updateData(ICResourceDescription rcfg) {
|
||||||
if (page.isMultiCfg()) {
|
if (page.isMultiCfg()) {
|
||||||
usercomp.setVisible(false);
|
setAllVisible(false, null);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
usercomp.setVisible(true);
|
setAllVisible(true, null);
|
||||||
configPath = rcfg.getPath();
|
configPath = rcfg.getPath();
|
||||||
IConfiguration cfg = getCfg(rcfg.getConfiguration());
|
IConfiguration cfg = getCfg(rcfg.getConfiguration());
|
||||||
cbi = CfgScannerConfigProfileManager.getCfgScannerConfigBuildInfo(cfg);
|
cbi = CfgScannerConfigProfileManager.getCfgScannerConfigBuildInfo(cfg);
|
||||||
|
@ -210,13 +209,11 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
if (scopeComboBox != null)
|
if (scopeComboBox != null)
|
||||||
scopeComboBox.select(cbi.isPerRcTypeDiscovery() ? 0 : 1);
|
scopeComboBox.select(cbi.isPerRcTypeDiscovery() ? 0 : 1);
|
||||||
|
|
||||||
Map m = cbi.getInfoMap();
|
Map<CfgInfoContext, IScannerConfigBuilderInfo2> m = cbi.getInfoMap();
|
||||||
Iterator it = m.keySet().iterator();
|
|
||||||
int pos = resTable.getSelectionIndex();
|
int pos = resTable.getSelectionIndex();
|
||||||
resTable.removeAll();
|
resTable.removeAll();
|
||||||
while (it.hasNext()) {
|
for (CfgInfoContext ic : m.keySet()) {
|
||||||
String s = null;
|
String s = null;
|
||||||
CfgInfoContext ic = (CfgInfoContext)it.next();
|
|
||||||
IResourceInfo rci = ic.getResourceInfo();
|
IResourceInfo rci = ic.getResourceInfo();
|
||||||
if (rci == null) { // per configuration
|
if (rci == null) { // per configuration
|
||||||
s = ic.getConfiguration().getName();
|
s = ic.getConfiguration().getName();
|
||||||
|
@ -276,9 +273,9 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
scProblemReportingEnabledButton.setSelection(buildInfo.isProblemReportingEnabled());
|
scProblemReportingEnabledButton.setSelection(buildInfo.isProblemReportingEnabled());
|
||||||
|
|
||||||
profileComboBox.removeAll();
|
profileComboBox.removeAll();
|
||||||
List profilesList = buildInfo.getProfileIdList();
|
List<String> profilesList = buildInfo.getProfileIdList();
|
||||||
Collections.sort(profilesList, CDTListComparator.getInstance());
|
Collections.sort(profilesList, CDTListComparator.getInstance());
|
||||||
visibleProfilesList = new ArrayList(profilesList.size());
|
visibleProfilesList = new ArrayList<String>(profilesList.size());
|
||||||
|
|
||||||
if (realPages != null && realPages.length > 0) {
|
if (realPages != null && realPages.length > 0) {
|
||||||
for (int i=0; i<realPages.length; i++) {
|
for (int i=0; i<realPages.length; i++) {
|
||||||
|
@ -292,12 +289,10 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
realPages = new AbstractDiscoveryPage[profilesList.size()];
|
realPages = new AbstractDiscoveryPage[profilesList.size()];
|
||||||
String[] labels = new String[profilesList.size()];
|
String[] labels = new String[profilesList.size()];
|
||||||
String[] profiles = new String[profilesList.size()];
|
String[] profiles = new String[profilesList.size()];
|
||||||
Iterator it = profilesList.iterator();
|
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
String savedId = buildInfo.getSelectedProfileId();
|
String savedId = buildInfo.getSelectedProfileId();
|
||||||
while (it.hasNext()) {
|
for (String profileId : profilesList) {
|
||||||
String profileId = (String)it.next();
|
|
||||||
if (!cbi.isProfileSupported(iContext, profileId))
|
if (!cbi.isProfileSupported(iContext, profileId))
|
||||||
continue;
|
continue;
|
||||||
visibleProfilesList.add(profileId);
|
visibleProfilesList.add(profileId);
|
||||||
|
@ -305,8 +300,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
if (profileId.equals(savedId))
|
if (profileId.equals(savedId))
|
||||||
pos = counter;
|
pos = counter;
|
||||||
buildInfo.setSelectedProfileId(profileId); // needs to create page
|
buildInfo.setSelectedProfileId(profileId); // needs to create page
|
||||||
for (Iterator it2 = pagesList.iterator(); it2.hasNext(); ) {
|
for (DiscoveryProfilePageConfiguration p : pagesList) {
|
||||||
DiscoveryProfilePageConfiguration p = (DiscoveryProfilePageConfiguration)it2.next();
|
|
||||||
if (p != null && p.profId.equals(profileId)) {
|
if (p != null && p.profId.equals(profileId)) {
|
||||||
AbstractDiscoveryPage pg = p.getPage();
|
AbstractDiscoveryPage pg = p.getPage();
|
||||||
if (pg != null) {
|
if (pg != null) {
|
||||||
|
@ -400,7 +394,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void initializeProfilePageMap() {
|
private void initializeProfilePageMap() {
|
||||||
pagesList = new ArrayList(5);
|
pagesList = new ArrayList<DiscoveryProfilePageConfiguration>(5);
|
||||||
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(
|
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(
|
||||||
NAMESPACE, POINT);
|
NAMESPACE, POINT);
|
||||||
if (point == null) return;
|
if (point == null) return;
|
||||||
|
@ -488,7 +482,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
}
|
}
|
||||||
|
|
||||||
private void clearChangedDiscoveredInfos(){
|
private void clearChangedDiscoveredInfos(){
|
||||||
List changedContexts = checkChanges();
|
List<CfgInfoContext> changedContexts = checkChanges();
|
||||||
IProject project = getProject();
|
IProject project = getProject();
|
||||||
for(int i = 0; i < changedContexts.size(); i++){
|
for(int i = 0; i < changedContexts.size(); i++){
|
||||||
CfgInfoContext c = (CfgInfoContext)changedContexts.get(i);
|
CfgInfoContext c = (CfgInfoContext)changedContexts.get(i);
|
||||||
|
@ -497,14 +491,14 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List checkChanges(){
|
private List<CfgInfoContext> checkChanges(){
|
||||||
if(cbi == null || baseInfoMap == null)
|
if(cbi == null || baseInfoMap == null)
|
||||||
return new ArrayList(0);
|
return new ArrayList<CfgInfoContext>(0);
|
||||||
|
|
||||||
Map<CfgInfoContext, IScannerConfigBuilderInfo2> cfgInfoMap = cbi.getInfoMap();
|
Map<CfgInfoContext, IScannerConfigBuilderInfo2> cfgInfoMap = cbi.getInfoMap();
|
||||||
HashMap<InfoContext, Object> baseCopy = new HashMap<InfoContext, Object>(baseInfoMap);
|
HashMap<InfoContext, Object> baseCopy = new HashMap<InfoContext, Object>(baseInfoMap);
|
||||||
List<CfgInfoContext> list = new ArrayList<CfgInfoContext>();
|
List<CfgInfoContext> list = new ArrayList<CfgInfoContext>();
|
||||||
for(Map.Entry entry : cfgInfoMap.entrySet()){
|
for(Map.Entry<CfgInfoContext, IScannerConfigBuilderInfo2> entry : cfgInfoMap.entrySet()){
|
||||||
CfgInfoContext cic = (CfgInfoContext)entry.getKey();
|
CfgInfoContext cic = (CfgInfoContext)entry.getKey();
|
||||||
InfoContext c = cic.toInfoContext();
|
InfoContext c = cic.toInfoContext();
|
||||||
if(c == null)
|
if(c == null)
|
||||||
|
@ -553,7 +547,7 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean listEqual(List<Object> l1, List<Object> l2) {
|
private boolean listEqual(List<String> l1, List<String> l2) {
|
||||||
if (l1 == null && l2 == null) return true;
|
if (l1 == null && l2 == null) return true;
|
||||||
if (l2 == null || l2 == null) return false;
|
if (l2 == null || l2 == null) return false;
|
||||||
if (l1.size() != l2.size()) return false;
|
if (l1.size() != l2.size()) return false;
|
||||||
|
@ -561,9 +555,8 @@ public class DiscoveryTab extends AbstractCBuildPropertyTab implements IBuildInf
|
||||||
// since it's most probable, try it first.
|
// since it's most probable, try it first.
|
||||||
if (l1.equals(l2)) return true;
|
if (l1.equals(l2)) return true;
|
||||||
// order may differ...
|
// order may differ...
|
||||||
Iterator<Object> it = l1.iterator();
|
for (String s : l1)
|
||||||
while (it.hasNext())
|
if (!l2.contains(s)) return false;
|
||||||
if (!l2.contains(it.next())) return false;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,10 +171,10 @@ public class ToolChainEditTab extends AbstractCBuildPropertyTab {
|
||||||
|
|
||||||
protected void updateData(ICResourceDescription rcfg) {
|
protected void updateData(ICResourceDescription rcfg) {
|
||||||
if (page.isMultiCfg()) {
|
if (page.isMultiCfg()) {
|
||||||
usercomp.setVisible(false);
|
setAllVisible(false, null);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
usercomp.setVisible(true);
|
setAllVisible(true, null);
|
||||||
}
|
}
|
||||||
cfg = getCfg(rcfg.getConfiguration());
|
cfg = getCfg(rcfg.getConfiguration());
|
||||||
ri = cfg.getResourceInfo(rcfg.getPath(), false);
|
ri = cfg.getResourceInfo(rcfg.getPath(), false);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -66,9 +66,9 @@ public abstract class AbstractCWizard extends CNewWizard {
|
||||||
// Check for platform compatibility
|
// Check for platform compatibility
|
||||||
ITargetPlatform tp = tc.getTargetPlatform();
|
ITargetPlatform tp = tc.getTargetPlatform();
|
||||||
if (tp != null) {
|
if (tp != null) {
|
||||||
List osList = Arrays.asList(tc.getOSList());
|
List<String> osList = Arrays.asList(tc.getOSList());
|
||||||
if (osList.contains(ALL) || osList.contains(os)) {
|
if (osList.contains(ALL) || osList.contains(os)) {
|
||||||
List archList = Arrays.asList(tc.getArchList());
|
List<String> archList = Arrays.asList(tc.getArchList());
|
||||||
if (archList.contains(ALL) || archList.contains(arch))
|
if (archList.contains(ALL) || archList.contains(arch))
|
||||||
return true; // OS and ARCH fits
|
return true; // OS and ARCH fits
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -82,13 +82,12 @@ public class CDTConfigWizardPage extends WizardPage {
|
||||||
if (getDefault || table == null || !isVisited())
|
if (getDefault || table == null || !isVisited())
|
||||||
its = getDefaultCfgs(handler);
|
its = getDefaultCfgs(handler);
|
||||||
else {
|
else {
|
||||||
ArrayList out = new ArrayList(table.getItemCount());
|
ArrayList<CfgHolder> out = new ArrayList<CfgHolder>(table.getItemCount());
|
||||||
TableItem[] tis = table.getItems();
|
for (TableItem ti : table.getItems()) {
|
||||||
for (int i=0; i < tis.length; i++) {
|
if (ti.getChecked())
|
||||||
if (tis[i].getChecked())
|
out.add((CfgHolder)ti.getData());
|
||||||
out.add(tis[i].getData());
|
|
||||||
}
|
}
|
||||||
its = (CfgHolder[])out.toArray(new CfgHolder[out.size()]);
|
its = out.toArray(new CfgHolder[out.size()]);
|
||||||
}
|
}
|
||||||
return its;
|
return its;
|
||||||
}
|
}
|
||||||
|
@ -189,19 +188,18 @@ public class CDTConfigWizardPage extends WizardPage {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
static public CfgHolder[] getDefaultCfgs(MBSWizardHandler handler) {
|
static public CfgHolder[] getDefaultCfgs(MBSWizardHandler handler) {
|
||||||
IToolChain[] tcs = handler.getSelectedToolChains();
|
|
||||||
String id = handler.getPropertyId();
|
String id = handler.getPropertyId();
|
||||||
IProjectType pt = handler.getProjectType();
|
IProjectType pt = handler.getProjectType();
|
||||||
ArrayList out = new ArrayList(tcs.length * 2);
|
ArrayList<CfgHolder> out = new ArrayList<CfgHolder>();
|
||||||
for (int i=0; i < tcs.length; i++) {
|
for (IToolChain tc : handler.getSelectedToolChains()){
|
||||||
CfgHolder[] cfgs = null;
|
CfgHolder[] cfgs = null;
|
||||||
if (id != null)
|
if (id != null)
|
||||||
cfgs = CfgHolder.cfgs2items(ManagedBuildManager.getExtensionConfigurations(tcs[i], MBSWizardHandler.ARTIFACT, id));
|
cfgs = CfgHolder.cfgs2items(ManagedBuildManager.getExtensionConfigurations(tc, MBSWizardHandler.ARTIFACT, id));
|
||||||
else if (pt != null)
|
else if (pt != null)
|
||||||
cfgs = CfgHolder.cfgs2items(ManagedBuildManager.getExtensionConfigurations(tcs[i], pt));
|
cfgs = CfgHolder.cfgs2items(ManagedBuildManager.getExtensionConfigurations(tc, pt));
|
||||||
else { // Create default configuration for StdProject
|
else { // Create default configuration for StdProject
|
||||||
cfgs = new CfgHolder[1];
|
cfgs = new CfgHolder[1];
|
||||||
cfgs[0] = new CfgHolder(tcs[i], null);
|
cfgs[0] = new CfgHolder(tc, null);
|
||||||
}
|
}
|
||||||
if (cfgs == null) return null;
|
if (cfgs == null) return null;
|
||||||
|
|
||||||
|
@ -210,7 +208,7 @@ public class CDTConfigWizardPage extends WizardPage {
|
||||||
out.add(cfgs[j]);
|
out.add(cfgs[j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (CfgHolder[])out.toArray(new CfgHolder[out.size()]);
|
return out.toArray(new CfgHolder[out.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -158,7 +158,7 @@ public class CfgHolder {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public static CfgHolder[] reorder(CfgHolder[] its) {
|
public static CfgHolder[] reorder(CfgHolder[] its) {
|
||||||
ArrayList ls = new ArrayList(its.length);
|
ArrayList<CfgHolder> ls = new ArrayList<CfgHolder>(its.length);
|
||||||
boolean found = true;
|
boolean found = true;
|
||||||
while (found) {
|
while (found) {
|
||||||
found = false;
|
found = false;
|
||||||
|
@ -185,7 +185,7 @@ public class CfgHolder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (CfgHolder[])ls.toArray(new CfgHolder[ls.size()]);
|
return ls.toArray(new CfgHolder[ls.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -193,10 +193,11 @@ public class CfgHolder {
|
||||||
* Note that null configurations are ignored !
|
* Note that null configurations are ignored !
|
||||||
*/
|
*/
|
||||||
public static IConfiguration[] items2cfgs(CfgHolder[] its) {
|
public static IConfiguration[] items2cfgs(CfgHolder[] its) {
|
||||||
ArrayList lst = new ArrayList(its.length);
|
ArrayList<IConfiguration> lst = new ArrayList<IConfiguration>(its.length);
|
||||||
for (int i=0; i<its.length; i++)
|
for (CfgHolder h : its)
|
||||||
if (its[i].cfg != null) lst.add(its[i].cfg);
|
if (h.cfg != null)
|
||||||
return (IConfiguration[])lst.toArray(new IConfiguration[lst.size()]);
|
lst.add(h.cfg);
|
||||||
|
return lst.toArray(new IConfiguration[lst.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IConfiguration getTcCfg() {
|
public IConfiguration getTcCfg() {
|
||||||
|
|
|
@ -582,7 +582,7 @@ public class MBSWizardHandler extends CWizardHandler {
|
||||||
* @
|
* @
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public void updatePreferred(List prefs) {
|
public void updatePreferred(List<String> prefs) {
|
||||||
int x = table.getItemCount();
|
int x = table.getItemCount();
|
||||||
for (int i=0; i<x; i++) {
|
for (int i=0; i<x; i++) {
|
||||||
TableItem ti = table.getItem(i);
|
TableItem ti = table.getItem(i);
|
||||||
|
|
|
@ -31,7 +31,7 @@ public interface ICLanguageSetting extends ICSettingObject {
|
||||||
|
|
||||||
ICLanguageSettingEntry[] getSettingEntries(int kind);
|
ICLanguageSettingEntry[] getSettingEntries(int kind);
|
||||||
|
|
||||||
List getSettingEntriesList(int kind);
|
List<ICLanguageSettingEntry> getSettingEntriesList(int kind);
|
||||||
|
|
||||||
// ICLanguageSettingEntry[] getResolvedSettingEntries();
|
// ICLanguageSettingEntry[] getResolvedSettingEntries();
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ public interface ICLanguageSetting extends ICSettingObject {
|
||||||
|
|
||||||
void setSettingEntries(int kind, ICLanguageSettingEntry[] entries);
|
void setSettingEntries(int kind, ICLanguageSettingEntry[] entries);
|
||||||
|
|
||||||
void setSettingEntries(int kind, List entriesList);
|
void setSettingEntries(int kind, List<ICLanguageSettingEntry> entriesList);
|
||||||
|
|
||||||
// void changeEntries(ICLanguageSettingEntryInfo[] added, ICLanguageSettingEntry[] removed);
|
// void changeEntries(ICLanguageSettingEntryInfo[] added, ICLanguageSettingEntry[] removed);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.core.settings.model.util;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
@ -24,7 +23,6 @@ import org.eclipse.cdt.core.settings.model.ICLibraryFileEntry;
|
||||||
import org.eclipse.cdt.core.settings.model.ICLibraryPathEntry;
|
import org.eclipse.cdt.core.settings.model.ICLibraryPathEntry;
|
||||||
import org.eclipse.cdt.core.settings.model.ICMacroEntry;
|
import org.eclipse.cdt.core.settings.model.ICMacroEntry;
|
||||||
import org.eclipse.cdt.core.settings.model.ICMacroFileEntry;
|
import org.eclipse.cdt.core.settings.model.ICMacroFileEntry;
|
||||||
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
|
||||||
|
|
||||||
public class EntryStore {
|
public class EntryStore {
|
||||||
private KindBasedStore fStore = new KindBasedStore();
|
private KindBasedStore fStore = new KindBasedStore();
|
||||||
|
@ -39,40 +37,35 @@ public class EntryStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntryStore(EntryStore base, boolean preserveReadOnly){
|
public EntryStore(EntryStore base, boolean preserveReadOnly){
|
||||||
int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
for(int kind : KindBasedStore.getLanguageEntryKinds()){
|
||||||
int kind;
|
ArrayList<?> list = (ArrayList<?>)fStore.get(kind);
|
||||||
for(int i = 0; i < kinds.length; i++){
|
|
||||||
kind = kinds[i];
|
|
||||||
ArrayList list = (ArrayList)fStore.get(kind);
|
|
||||||
if(list != null)
|
if(list != null)
|
||||||
fStore.put(kind, (ArrayList)list.clone());
|
fStore.put(kind, (ArrayList<?>)list.clone());
|
||||||
}
|
}
|
||||||
fPreserveReadOnly = preserveReadOnly;
|
fPreserveReadOnly = preserveReadOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public ICLanguageSettingEntry[] getEntries(){
|
public ICLanguageSettingEntry[] getEntries(){
|
||||||
int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
List<ICLanguageSettingEntry> result = new ArrayList<ICLanguageSettingEntry>();
|
||||||
List result = new ArrayList();
|
List<ICLanguageSettingEntry> list;
|
||||||
List list;
|
for(int k: KindBasedStore.getLanguageEntryKinds()){
|
||||||
for(int i = 0; i < kinds.length; i++){
|
list = (List<ICLanguageSettingEntry>)fStore.get(k);
|
||||||
list = (List)fStore.get(kinds[i]);
|
|
||||||
if(list != null)
|
if(list != null)
|
||||||
result.addAll(list);
|
result.addAll(list);
|
||||||
}
|
}
|
||||||
|
return result.toArray(new ICLanguageSettingEntry[result.size()]);
|
||||||
return (ICLanguageSettingEntry[])result.toArray(new ICLanguageSettingEntry[result.size()]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean containsEntriesList(int kind){
|
public boolean containsEntriesList(int kind){
|
||||||
List list = getEntriesList(kind, false);
|
List<?> list = getEntriesList(kind, false);
|
||||||
return list != null;
|
return list != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ICLanguageSettingEntry[] getEntries(int kind){
|
public ICLanguageSettingEntry[] getEntries(int kind){
|
||||||
List list = getEntriesList(kind);
|
List<ICLanguageSettingEntry> list = getEntriesList(kind);
|
||||||
// if(list != null){
|
|
||||||
if(list == null)
|
if(list == null)
|
||||||
list = new ArrayList(0);
|
list = new ArrayList<ICLanguageSettingEntry>(0);
|
||||||
switch(kind){
|
switch(kind){
|
||||||
case ICLanguageSettingEntry.INCLUDE_PATH:
|
case ICLanguageSettingEntry.INCLUDE_PATH:
|
||||||
return (ICLanguageSettingEntry[])list.toArray(new ICIncludePathEntry[list.size()]);
|
return (ICLanguageSettingEntry[])list.toArray(new ICIncludePathEntry[list.size()]);
|
||||||
|
@ -89,25 +82,24 @@ public class EntryStore {
|
||||||
default:
|
default:
|
||||||
throw new IllegalArgumentException();
|
throw new IllegalArgumentException();
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List getEntriesList(int kind){
|
public List<ICLanguageSettingEntry> getEntriesList(int kind){
|
||||||
List list = getEntriesList(kind, false);
|
List<ICLanguageSettingEntry> list = getEntriesList(kind, false);
|
||||||
if(list != null)
|
if(list != null)
|
||||||
return new ArrayList(list);
|
return new ArrayList<ICLanguageSettingEntry>(list);
|
||||||
return new ArrayList(0);
|
return new ArrayList<ICLanguageSettingEntry>(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setEntriesList(int kind, List list){
|
private void setEntriesList(int kind, List<ICLanguageSettingEntry> list){
|
||||||
fStore.put(kind, list);
|
fStore.put(kind, list);
|
||||||
}
|
}
|
||||||
|
|
||||||
private List getEntriesList(int kind, boolean create){
|
@SuppressWarnings("unchecked")
|
||||||
List list = (List)fStore.get(kind);
|
private List<ICLanguageSettingEntry> getEntriesList(int kind, boolean create){
|
||||||
|
List<ICLanguageSettingEntry> list = (List<ICLanguageSettingEntry>)fStore.get(kind);
|
||||||
if(list == null && create){
|
if(list == null && create){
|
||||||
fStore.put(kind, list = new ArrayList());
|
fStore.put(kind, list = new ArrayList<ICLanguageSettingEntry>());
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +109,7 @@ public class EntryStore {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public void addEntry(int pos, ICLanguageSettingEntry entry){
|
public void addEntry(int pos, ICLanguageSettingEntry entry){
|
||||||
List list = getEntriesList(entry.getKind(), true);
|
List<ICLanguageSettingEntry> list = getEntriesList(entry.getKind(), true);
|
||||||
if(pos >= list.size())
|
if(pos >= list.size())
|
||||||
list.add(entry);
|
list.add(entry);
|
||||||
else
|
else
|
||||||
|
@ -131,19 +123,21 @@ public class EntryStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void storeEntries(int kind, ICLanguageSettingEntry[] entries){
|
public void storeEntries(int kind, ICLanguageSettingEntry[] entries){
|
||||||
storeEntries(kind, entries != null ? Arrays.asList(entries) : new ArrayList());
|
storeEntries(kind,
|
||||||
|
entries != null ?
|
||||||
|
Arrays.asList(entries) :
|
||||||
|
new ArrayList<ICLanguageSettingEntry>());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void storeEntries(int kind, List list){
|
public void storeEntries(int kind, List<ICLanguageSettingEntry> list){
|
||||||
List newList = new ArrayList(list);
|
List<ICLanguageSettingEntry> newList = new ArrayList<ICLanguageSettingEntry>(list);
|
||||||
// newList.addAll(Arrays.asList(entries));
|
// newList.addAll(Arrays.asList(entries));
|
||||||
if(fPreserveReadOnly){
|
if(fPreserveReadOnly){
|
||||||
List oldList = getEntriesList(kind, false);
|
List<ICLanguageSettingEntry> oldList = getEntriesList(kind, false);
|
||||||
if(oldList != null){
|
if(oldList != null){
|
||||||
Set ro = getReadOnlySet(oldList);
|
Set<ICLanguageSettingEntry> ro = getReadOnlySet(oldList);
|
||||||
ro.removeAll(newList);
|
ro.removeAll(newList);
|
||||||
for(Iterator iter = oldList.iterator(); iter.hasNext();){
|
for(ICLanguageSettingEntry o : oldList){
|
||||||
Object o = iter.next();
|
|
||||||
if(ro.contains(o))
|
if(ro.contains(o))
|
||||||
newList.add(o);
|
newList.add(o);
|
||||||
}
|
}
|
||||||
|
@ -152,10 +146,9 @@ public class EntryStore {
|
||||||
setEntriesList(kind, newList);
|
setEntriesList(kind, newList);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Set getReadOnlySet(List entries){
|
private Set<ICLanguageSettingEntry> getReadOnlySet(List<ICLanguageSettingEntry> entries){
|
||||||
Set set = new HashSet();
|
Set<ICLanguageSettingEntry> set = new HashSet<ICLanguageSettingEntry>();
|
||||||
for(Iterator iter = entries.iterator(); iter.hasNext();){
|
for(ICLanguageSettingEntry entry : entries){
|
||||||
ICSettingEntry entry = (ICSettingEntry)iter.next();
|
|
||||||
if(entry.isReadOnly())
|
if(entry.isReadOnly())
|
||||||
set.add(entry);
|
set.add(entry);
|
||||||
}
|
}
|
||||||
|
@ -163,14 +156,16 @@ public class EntryStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addEntry(ICLanguageSettingEntry entry){
|
public void addEntry(ICLanguageSettingEntry entry){
|
||||||
List list = getEntriesList(entry.getKind(), true);
|
List<ICLanguageSettingEntry> list = getEntriesList(entry.getKind(), true);
|
||||||
list.add(entry);
|
list.add(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public void trimToSize(){
|
public void trimToSize(){
|
||||||
int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
||||||
for(int i = 0; i < kinds.length; i++){
|
for(int i = 0; i < kinds.length; i++){
|
||||||
ArrayList list = (ArrayList)fStore.get(kinds[i]);
|
ArrayList<ICLanguageSettingEntry> list =
|
||||||
|
(ArrayList<ICLanguageSettingEntry>)fStore.get(kinds[i]);
|
||||||
if(list != null)
|
if(list != null)
|
||||||
list.trimToSize();
|
list.trimToSize();
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
package org.eclipse.cdt.internal.core.settings.model;
|
package org.eclipse.cdt.internal.core.settings.model;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.settings.model.ICLanguageSetting;
|
import org.eclipse.cdt.core.settings.model.ICLanguageSetting;
|
||||||
|
@ -62,11 +61,11 @@ public class CLanguageSetting extends CDataProxy implements
|
||||||
return data.getEntries(kind);
|
return data.getEntries(kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List getSettingEntriesList(int kind) {
|
public List<ICLanguageSettingEntry> getSettingEntriesList(int kind) {
|
||||||
CLanguageData data = getCLanguageData(false);
|
CLanguageData data = getCLanguageData(false);
|
||||||
ICLanguageSettingEntry entries[] = data.getEntries(kind);
|
ICLanguageSettingEntry entries[] = data.getEntries(kind);
|
||||||
int size = entries != null ? entries.length : 0;
|
int size = entries != null ? entries.length : 0;
|
||||||
List arrayList = new ArrayList(size);
|
List<ICLanguageSettingEntry> arrayList = new ArrayList<ICLanguageSettingEntry>(size);
|
||||||
for(int i = 0; i < size; i++){
|
for(int i = 0; i < size; i++){
|
||||||
arrayList.add(entries[i]);
|
arrayList.add(entries[i]);
|
||||||
}
|
}
|
||||||
|
@ -290,7 +289,7 @@ public class CLanguageSetting extends CDataProxy implements
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSettingEntries(int kind, List list) {
|
public void setSettingEntries(int kind, List<ICLanguageSettingEntry> list) {
|
||||||
CLanguageData data = getCLanguageData(true);
|
CLanguageData data = getCLanguageData(true);
|
||||||
EntryStore store = new EntryStore();
|
EntryStore store = new EntryStore();
|
||||||
// KindBasedStore nameSetStore = new KindBasedStore();
|
// KindBasedStore nameSetStore = new KindBasedStore();
|
||||||
|
@ -298,8 +297,7 @@ public class CLanguageSetting extends CDataProxy implements
|
||||||
|
|
||||||
if(list != null){
|
if(list != null){
|
||||||
if(list.size() != 0){
|
if(list.size() != 0){
|
||||||
for(Iterator iter = list.iterator(); iter.hasNext();){
|
for(ICLanguageSettingEntry entry : list){
|
||||||
ICLanguageSettingEntry entry = (ICLanguageSettingEntry)iter.next();
|
|
||||||
eKind = entry.getKind();
|
eKind = entry.getKind();
|
||||||
if((kind & eKind) != 0 && (data.getSupportedEntryKinds() & eKind) != 0){
|
if((kind & eKind) != 0 && (data.getSupportedEntryKinds() & eKind) != 0){
|
||||||
store.addEntry(entry);
|
store.addEntry(entry);
|
||||||
|
@ -307,9 +305,9 @@ public class CLanguageSetting extends CDataProxy implements
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
int kinds[] = KindBasedStore.getLanguageEntryKinds();
|
||||||
for(int i = 0; i < kinds.length; i++){
|
for(int k : kinds){
|
||||||
if((kinds[i] & kind) != 0){
|
if((k & kind) != 0){
|
||||||
store.storeEntries(kinds[i], new ICLanguageSettingEntry[0]);
|
store.storeEntries(k, new ICLanguageSettingEntry[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@ public class CLanguageSettingCache extends CDefaultLanguageData implements
|
||||||
return fStore.getEntries(kind);
|
return fStore.getEntries(kind);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List getSettingEntriesList(int kind) {
|
public List<ICLanguageSettingEntry> getSettingEntriesList(int kind) {
|
||||||
// int kinds[] = KindBasedStore.getSupportedKinds();
|
// int kinds[] = KindBasedStore.getSupportedKinds();
|
||||||
// List list = new ArrayList();
|
// List list = new ArrayList();
|
||||||
// for(int i = 0; i < kinds.length; i++){
|
// for(int i = 0; i < kinds.length; i++){
|
||||||
|
@ -135,7 +135,7 @@ public class CLanguageSettingCache extends CDefaultLanguageData implements
|
||||||
throw ExceptionFactory.createIsReadOnlyException();
|
throw ExceptionFactory.createIsReadOnlyException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSettingEntries(int kind, List entriesList) {
|
public void setSettingEntries(int kind, List<ICLanguageSettingEntry> entriesList) {
|
||||||
throw ExceptionFactory.createIsReadOnlyException();
|
throw ExceptionFactory.createIsReadOnlyException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,12 @@ import org.eclipse.cdt.core.settings.model.MultiItemsHolder;
|
||||||
* Normally, they should have the same name.
|
* Normally, they should have the same name.
|
||||||
*/
|
*/
|
||||||
public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguageSetting {
|
public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguageSetting {
|
||||||
private static final Comparator comp = CDTListComparator.getInstance();
|
private static final Comparator<Object> comp = CDTListComparator.getInstance();
|
||||||
|
|
||||||
ICLanguageSetting[] items = null;
|
ICLanguageSetting[] items = null;
|
||||||
ICConfigurationDescription cfgd = null;
|
ICConfigurationDescription cfgd = null;
|
||||||
|
|
||||||
public MultiLanguageSetting(List data, ICConfigurationDescription cf) {
|
public MultiLanguageSetting(List<ICLanguageSetting> data, ICConfigurationDescription cf) {
|
||||||
items = (ICLanguageSetting[])data.toArray(new ICLanguageSetting[data.size()]);
|
items = (ICLanguageSetting[])data.toArray(new ICLanguageSetting[data.size()]);
|
||||||
cfgd = cf;
|
cfgd = cf;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#getSettingEntriesList(int)
|
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#getSettingEntriesList(int)
|
||||||
*/
|
*/
|
||||||
public List getSettingEntriesList(int kind) {
|
public List<ICLanguageSettingEntry> getSettingEntriesList(int kind) {
|
||||||
return Arrays.asList(getSettingEntries(kind));
|
return Arrays.asList(getSettingEntries(kind));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ public class MultiLanguageSetting extends MultiItemsHolder implements ICLanguage
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setSettingEntries(int, java.util.List)
|
* @see org.eclipse.cdt.core.settings.model.ICLanguageSetting#setSettingEntries(int, java.util.List)
|
||||||
*/
|
*/
|
||||||
public void setSettingEntries(int kind, List entriesList) {
|
public void setSettingEntries(int kind, List<ICLanguageSettingEntry> entriesList) {
|
||||||
for (int i=0; i<items.length; i++)
|
for (int i=0; i<items.length; i++)
|
||||||
items[i].setSettingEntries(kind, entriesList);
|
items[i].setSettingEntries(kind, entriesList);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,11 +23,13 @@ import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
import org.eclipse.jface.window.Window;
|
import org.eclipse.jface.window.Window;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
|
import org.eclipse.swt.custom.CLabel;
|
||||||
import org.eclipse.swt.events.SelectionAdapter;
|
import org.eclipse.swt.events.SelectionAdapter;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
import org.eclipse.swt.graphics.FontMetrics;
|
import org.eclipse.swt.graphics.FontMetrics;
|
||||||
import org.eclipse.swt.graphics.GC;
|
import org.eclipse.swt.graphics.GC;
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
|
import org.eclipse.swt.layout.FillLayout;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
import org.eclipse.swt.widgets.Button;
|
import org.eclipse.swt.widgets.Button;
|
||||||
|
@ -95,11 +97,13 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
public static final String WORKSPACE_FILE_DIALOG_MSG = UIMessages.getString("BrowseEntryDialog.wsp.file.dlg.msg"); //$NON-NLS-1$
|
public static final String WORKSPACE_FILE_DIALOG_MSG = UIMessages.getString("BrowseEntryDialog.wsp.file.dlg.msg"); //$NON-NLS-1$
|
||||||
public static final String WORKSPACE_FILE_DIALOG_ERR = UIMessages.getString("BrowseEntryDialog.wsp.file.dlg.err"); //$NON-NLS-1$
|
public static final String WORKSPACE_FILE_DIALOG_ERR = UIMessages.getString("BrowseEntryDialog.wsp.file.dlg.err"); //$NON-NLS-1$
|
||||||
public static final String WORKSPACE_DIR_DIALOG_ERR = UIMessages.getString("BrowseEntryDialog.wsp.dir.dlg.err"); //$NON-NLS-1$
|
public static final String WORKSPACE_DIR_DIALOG_ERR = UIMessages.getString("BrowseEntryDialog.wsp.dir.dlg.err"); //$NON-NLS-1$
|
||||||
|
public static final String BACKGROUND_TEXT_DEFAULT = UIMessages.getString("AbstractCPropertyTab.2"); //$NON-NLS-1$
|
||||||
|
|
||||||
public static final int TRI_UNKNOWN = 2;
|
public static final int TRI_UNKNOWN = 2;
|
||||||
public static final int TRI_YES = 1;
|
public static final int TRI_YES = 1;
|
||||||
public static final int TRI_NO = 0;
|
public static final int TRI_NO = 0;
|
||||||
|
|
||||||
|
private CLabel background;
|
||||||
protected Composite usercomp; // space where user can create widgets
|
protected Composite usercomp; // space where user can create widgets
|
||||||
protected Composite buttoncomp; // space for buttons on the right
|
protected Composite buttoncomp; // space for buttons on the right
|
||||||
private Button[] buttons; // buttons in buttoncomp
|
private Button[] buttons; // buttons in buttoncomp
|
||||||
|
@ -121,10 +125,13 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
* @param parent
|
* @param parent
|
||||||
*/
|
*/
|
||||||
protected void createControls(Composite parent) {
|
protected void createControls(Composite parent) {
|
||||||
parent.setLayout(new GridLayout(2, false));
|
parent.setLayout(new FillLayout());
|
||||||
usercomp = new Composite(parent, SWT.NONE);
|
background = new CLabel(parent, SWT.CENTER | SWT.SHADOW_NONE);
|
||||||
|
background.setText(BACKGROUND_TEXT_DEFAULT);
|
||||||
|
background.setLayout(new GridLayout(2, false));
|
||||||
|
usercomp = new Composite(background, SWT.NONE);
|
||||||
usercomp.setLayoutData(new GridData(GridData.FILL_BOTH));
|
usercomp.setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||||
buttoncomp = new Composite(parent, SWT.NONE);
|
buttoncomp = new Composite(background, SWT.NONE);
|
||||||
GridData d = new GridData(GridData.END);
|
GridData d = new GridData(GridData.END);
|
||||||
d.widthHint = 1;
|
d.widthHint = 1;
|
||||||
buttoncomp.setLayoutData(d);
|
buttoncomp.setLayoutData(d);
|
||||||
|
@ -600,4 +607,27 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility method to show/hide working panes
|
||||||
|
* When panes are hidden, message becomes visible
|
||||||
|
*
|
||||||
|
* @param visible - true or false
|
||||||
|
* @param msg - text to be shown instead of panes
|
||||||
|
*/
|
||||||
|
protected void setAllVisible(boolean visible, String msg) {
|
||||||
|
if (!visible)
|
||||||
|
setBackgroundText(msg);
|
||||||
|
usercomp.setVisible(visible);
|
||||||
|
buttoncomp.setVisible(visible);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Allows changing message on background pane,
|
||||||
|
* which becomes visible after usercomp hidden
|
||||||
|
*
|
||||||
|
* @param s - text to display or null for default
|
||||||
|
*/
|
||||||
|
protected void setBackgroundText(String s) {
|
||||||
|
background.setText(s == null ? BACKGROUND_TEXT_DEFAULT : s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,11 +66,11 @@ public abstract class AbstractExportTab extends AbstractCPropertyTab {
|
||||||
public static final Image IMG_MK = CPluginImages.get(CPluginImages.IMG_OBJS_MACRO);
|
public static final Image IMG_MK = CPluginImages.get(CPluginImages.IMG_OBJS_MACRO);
|
||||||
private static final String ALL = UIMessages.getString("AbstractExportTab.0"); //$NON-NLS-1$
|
private static final String ALL = UIMessages.getString("AbstractExportTab.0"); //$NON-NLS-1$
|
||||||
private static final String LIST = UIMessages.getString("AbstractExportTab.1"); //$NON-NLS-1$
|
private static final String LIST = UIMessages.getString("AbstractExportTab.1"); //$NON-NLS-1$
|
||||||
private static Map names_l = new HashMap();
|
private static Map<String, String> names_l = new HashMap<String, String>();
|
||||||
private static Map names_t = new HashMap();
|
private static Map<String, String> names_t = new HashMap<String, String>();
|
||||||
private static String[] names_ls;
|
private static String[] names_ls;
|
||||||
private static String[] names_ts;
|
private static String[] names_ts;
|
||||||
private List namesList;
|
private List<String> namesList;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
ILanguage[] ls = lm.getRegisteredLanguages();
|
ILanguage[] ls = lm.getRegisteredLanguages();
|
||||||
|
@ -171,20 +171,20 @@ public abstract class AbstractExportTab extends AbstractCPropertyTab {
|
||||||
int x = table.getSelectionIndex();
|
int x = table.getSelectionIndex();
|
||||||
if (x == -1) x = 0;
|
if (x == -1) x = 0;
|
||||||
|
|
||||||
namesList = new ArrayList();
|
namesList = new ArrayList<String>();
|
||||||
ArrayList lst = new ArrayList();
|
ArrayList<ExtData> lst = new ArrayList<ExtData>();
|
||||||
ICExternalSetting[] vals = cfg.getExternalSettings();
|
ICExternalSetting[] vals = cfg.getExternalSettings();
|
||||||
if (vals == null || vals.length == 0) {
|
if (vals == null || vals.length == 0) {
|
||||||
tv.setInput(null);
|
tv.setInput(null);
|
||||||
updateButtons();
|
updateButtons();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (int i=0; i<vals.length; i++) {
|
for (ICExternalSetting v : vals) {
|
||||||
ICSettingEntry[] ents = vals[i].getEntries(getKind());
|
ICSettingEntry[] ents = v.getEntries(getKind());
|
||||||
if (ents == null || ents.length == 0) continue;
|
if (ents == null || ents.length == 0) continue;
|
||||||
for (int j=0; j<ents.length; j++) {
|
for (ICSettingEntry se : ents) {
|
||||||
lst.add(new ExtData(vals[i], ents[j]));
|
lst.add(new ExtData(v, se));
|
||||||
namesList.add(ents[j].getName());
|
namesList.add(se.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Collections.sort(lst, CDTListComparator.getInstance());
|
Collections.sort(lst, CDTListComparator.getInstance());
|
||||||
|
@ -201,13 +201,10 @@ public abstract class AbstractExportTab extends AbstractCPropertyTab {
|
||||||
public void updateData(ICResourceDescription rcfg) {
|
public void updateData(ICResourceDescription rcfg) {
|
||||||
if (rcfg == null) return;
|
if (rcfg == null) return;
|
||||||
if (page.isMultiCfg()) {
|
if (page.isMultiCfg()) {
|
||||||
usercomp.setVisible(false);
|
setAllVisible(false, null);
|
||||||
buttoncomp.setVisible(false);
|
|
||||||
} else {
|
} else {
|
||||||
if (! usercomp.getVisible()) {
|
if (! usercomp.getVisible())
|
||||||
usercomp.setVisible(true);
|
setAllVisible(true, null);
|
||||||
buttoncomp.setVisible(true);
|
|
||||||
}
|
|
||||||
cfg = rcfg.getConfiguration();
|
cfg = rcfg.getConfiguration();
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
@ -279,27 +276,27 @@ public abstract class AbstractExportTab extends AbstractCPropertyTab {
|
||||||
old = (ExtData)(its[t].getData());
|
old = (ExtData)(its[t].getData());
|
||||||
if (old.entry.isReadOnly() || old.entry.isBuiltIn()) continue;
|
if (old.entry.isReadOnly() || old.entry.isBuiltIn()) continue;
|
||||||
ICSettingEntry[] ls = old.setting.getEntries(getKind());
|
ICSettingEntry[] ls = old.setting.getEntries(getKind());
|
||||||
ArrayList lst = new ArrayList();
|
ArrayList<ICSettingEntry> lst = new ArrayList<ICSettingEntry>();
|
||||||
outer:
|
outer:
|
||||||
for (int x=0; x<ls.length; x++) {
|
for (ICSettingEntry se : ls) {
|
||||||
for (int y=t; y<its.length; y++) {
|
for (int y=t; y<its.length; y++) {
|
||||||
if (its[y] == null) break;
|
if (its[y] == null) break;
|
||||||
Object ob = its[y].getData();
|
Object ob = its[y].getData();
|
||||||
if (ob != null && (ob instanceof ExtData)) {
|
if (ob != null && (ob instanceof ExtData)) {
|
||||||
ExtData ex = (ExtData)ob;
|
ExtData ex = (ExtData)ob;
|
||||||
if (ls[x].equals(ex.entry)) {
|
if (se.equals(ex.entry)) {
|
||||||
checked[y] = true;
|
checked[y] = true;
|
||||||
continue outer;
|
continue outer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lst.add(ls[x]);
|
lst.add(se);
|
||||||
}
|
}
|
||||||
cfg.removeExternalSetting(old.setting);
|
cfg.removeExternalSetting(old.setting);
|
||||||
cfg.createExternalSetting(old.setting.getCompatibleLanguageIds(),
|
cfg.createExternalSetting(old.setting.getCompatibleLanguageIds(),
|
||||||
old.setting.getCompatibleContentTypeIds(),
|
old.setting.getCompatibleContentTypeIds(),
|
||||||
old.setting.getCompatibleExtensions(),
|
old.setting.getCompatibleExtensions(),
|
||||||
(ICLanguageSettingEntry[])lst.toArray(new ICLanguageSettingEntry[lst.size()]));
|
lst.toArray(new ICLanguageSettingEntry[lst.size()]));
|
||||||
}
|
}
|
||||||
update();
|
update();
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.ui.newui;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -72,8 +71,8 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
|
||||||
protected boolean toAllLang = false;
|
protected boolean toAllLang = false;
|
||||||
|
|
||||||
protected ICLanguageSetting lang;
|
protected ICLanguageSetting lang;
|
||||||
protected LinkedList incs;
|
protected LinkedList<ICLanguageSettingEntry> incs;
|
||||||
protected ArrayList exported;
|
protected ArrayList<ICSettingEntry> exported;
|
||||||
protected SashForm sashForm;
|
protected SashForm sashForm;
|
||||||
|
|
||||||
protected final static String[] BUTTONS = {ADD_STR, EDIT_STR, DEL_STR,
|
protected final static String[] BUTTONS = {ADD_STR, EDIT_STR, DEL_STR,
|
||||||
|
@ -261,21 +260,18 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
|
||||||
if (x == -1) x = 0;
|
if (x == -1) x = 0;
|
||||||
else x += shift; // used only for UP/DOWN
|
else x += shift; // used only for UP/DOWN
|
||||||
|
|
||||||
incs = new LinkedList();
|
incs = new LinkedList<ICLanguageSettingEntry>();
|
||||||
List lst = getSettingEntriesList(getKind());
|
List<ICLanguageSettingEntry> lst = getSettingEntriesList(getKind());
|
||||||
if (lst != null) {
|
if (lst != null) {
|
||||||
Iterator it = lst.iterator();
|
for (ICLanguageSettingEntry ent : lst) {
|
||||||
while (it.hasNext()) {
|
if (!ent.isBuiltIn())
|
||||||
ICLanguageSettingEntry ent = (ICLanguageSettingEntry)it.next();
|
incs.add(ent);
|
||||||
if (!ent.isBuiltIn()) incs.add(ent);
|
|
||||||
}
|
}
|
||||||
if (showBIButton.getSelection()) {
|
if (showBIButton.getSelection()) {
|
||||||
ArrayList lstS = new ArrayList();
|
ArrayList<ICLanguageSettingEntry> lstS = new ArrayList<ICLanguageSettingEntry>();
|
||||||
it = lst.iterator();
|
for (ICLanguageSettingEntry ent : lst)
|
||||||
while (it.hasNext()) {
|
if (ent.isBuiltIn())
|
||||||
ICLanguageSettingEntry ent = (ICLanguageSettingEntry)it.next();
|
lstS.add(ent);
|
||||||
if (ent.isBuiltIn()) lstS.add(ent);
|
|
||||||
}
|
|
||||||
incs.addAll(lstS);
|
incs.addAll(lstS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -329,14 +325,14 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateExport() {
|
private void updateExport() {
|
||||||
exported = new ArrayList();
|
exported = new ArrayList<ICSettingEntry>();
|
||||||
ICExternalSetting[] vals = getResDesc().getConfiguration().getExternalSettings();
|
ICExternalSetting[] vals = getResDesc().getConfiguration().getExternalSettings();
|
||||||
if (!(vals == null || vals.length == 0)) {
|
if (!(vals == null || vals.length == 0)) {
|
||||||
for (int i=0; i<vals.length; i++) {
|
for (ICExternalSetting v : vals) {
|
||||||
ICSettingEntry[] ents = vals[i].getEntries(getKind());
|
ICSettingEntry[] ents = v.getEntries(getKind());
|
||||||
if (ents == null || ents.length == 0) continue;
|
if (ents == null || ents.length == 0) continue;
|
||||||
for (int j=0; j<ents.length; j++)
|
for (ICSettingEntry en : ents)
|
||||||
exported.add(ents[j]);
|
exported.add(en);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -407,8 +403,8 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
|
||||||
int x = incs.indexOf(old);
|
int x = incs.indexOf(old);
|
||||||
if (x < 0) break;
|
if (x < 0) break;
|
||||||
if (i == 6) x++; // "down" simply means "up underlying item"
|
if (i == 6) x++; // "down" simply means "up underlying item"
|
||||||
old = (ICLanguageSettingEntry)incs.get(x);
|
old = incs.get(x);
|
||||||
ICLanguageSettingEntry old2 = (ICLanguageSettingEntry)incs.get(x - 1);
|
ICLanguageSettingEntry old2 = incs.get(x - 1);
|
||||||
incs.remove(x);
|
incs.remove(x);
|
||||||
incs.remove(x - 1);
|
incs.remove(x - 1);
|
||||||
incs.add(x - 1, old);
|
incs.add(x - 1, old);
|
||||||
|
@ -462,12 +458,11 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
|
||||||
continue;
|
continue;
|
||||||
if (!toAllCfgs && !(cur_cfg.equals(rcfg)))
|
if (!toAllCfgs && !(cur_cfg.equals(rcfg)))
|
||||||
continue;
|
continue;
|
||||||
ICLanguageSetting [] ls = getLangSetting(rcfg);
|
for (ICLanguageSetting l : getLangSetting(rcfg)) {
|
||||||
for (int j = 0; j < ls.length; j++ ) {
|
if (id == l.getName() || toAllLang) {
|
||||||
if (id == ls[j].getName() || toAllLang) {
|
List<ICLanguageSettingEntry> lst = l.getSettingEntriesList(getKind());
|
||||||
List lst = ls[j].getSettingEntriesList(getKind());
|
|
||||||
lst.add(ent);
|
lst.add(ent);
|
||||||
ls[j].setSettingEntries(getKind(), lst);
|
l.setSettingEntries(getKind(), lst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -486,7 +481,7 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
|
||||||
for (int i=0; i<tis.length; i++) {
|
for (int i=0; i<tis.length; i++) {
|
||||||
Object ob = tis[i].getData();
|
Object ob = tis[i].getData();
|
||||||
if (ob != null && ob instanceof ICLanguageSetting) {
|
if (ob != null && ob instanceof ICLanguageSetting) {
|
||||||
((ICLanguageSetting)ob).setSettingEntries(getKind(), (List)null);
|
((ICLanguageSetting)ob).setSettingEntries(getKind(), (List<ICLanguageSettingEntry>)null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateData(this.getResDesc());
|
updateData(this.getResDesc());
|
||||||
|
@ -568,13 +563,13 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setSettingEntries(int kind, List incs, boolean toAll) {
|
private void setSettingEntries(int kind, List<ICLanguageSettingEntry> incs, boolean toAll) {
|
||||||
if (page.isMultiCfg()) {
|
if (page.isMultiCfg()) {
|
||||||
((ICMultiResourceDescription)getResDesc()).setSettingEntries(lang, kind, incs, toAll);
|
((ICMultiResourceDescription)getResDesc()).setSettingEntries(lang, kind, incs, toAll);
|
||||||
} else
|
} else
|
||||||
lang.setSettingEntries(kind, incs);
|
lang.setSettingEntries(kind, incs);
|
||||||
}
|
}
|
||||||
private List getSettingEntriesList(int kind) {
|
private List<ICLanguageSettingEntry> getSettingEntriesList(int kind) {
|
||||||
return lang.getSettingEntriesList(kind);
|
return lang.getSettingEntriesList(kind);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,8 +68,8 @@ public class BinaryParsTab extends AbstractCPropertyTab {
|
||||||
private static final String ATTR_VALUE = "value"; //$NON-NLS-1$
|
private static final String ATTR_VALUE = "value"; //$NON-NLS-1$
|
||||||
private static final String ATTR_VALUE_PRIVATE = "private"; //$NON-NLS-1$
|
private static final String ATTR_VALUE_PRIVATE = "private"; //$NON-NLS-1$
|
||||||
|
|
||||||
protected Map configMap;
|
protected Map<String, BinaryParserConfiguration> configMap;
|
||||||
protected Map fParserPageMap = null;
|
protected Map<String, BinaryParserPageConfiguration> fParserPageMap = null;
|
||||||
protected Table table;
|
protected Table table;
|
||||||
protected CheckboxTableViewer tv;
|
protected CheckboxTableViewer tv;
|
||||||
protected Composite parserGroup;
|
protected Composite parserGroup;
|
||||||
|
@ -185,7 +185,7 @@ public class BinaryParsTab extends AbstractCPropertyTab {
|
||||||
ids = CoreModelUtil.getBinaryParserIds(cfgs);
|
ids = CoreModelUtil.getBinaryParserIds(cfgs);
|
||||||
}
|
}
|
||||||
Object[] data = new Object[configMap.size()];
|
Object[] data = new Object[configMap.size()];
|
||||||
HashMap clone = new HashMap(configMap);
|
HashMap<String, BinaryParserConfiguration> clone = new HashMap<String, BinaryParserConfiguration>(configMap);
|
||||||
// add checked elements
|
// add checked elements
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<ids.length; i++) {
|
for (i=0; i<ids.length; i++) {
|
||||||
|
@ -214,7 +214,7 @@ public class BinaryParsTab extends AbstractCPropertyTab {
|
||||||
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, CCorePlugin.BINARY_PARSER_SIMPLE_ID);
|
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, CCorePlugin.BINARY_PARSER_SIMPLE_ID);
|
||||||
if (point != null) {
|
if (point != null) {
|
||||||
IExtension[] exts = point.getExtensions();
|
IExtension[] exts = point.getExtensions();
|
||||||
configMap = new HashMap(exts.length);
|
configMap = new HashMap<String, BinaryParserConfiguration>(exts.length);
|
||||||
for (int i = 0; i < exts.length; i++) {
|
for (int i = 0; i < exts.length; i++) {
|
||||||
if (isExtensionVisible(exts[i])) {
|
if (isExtensionVisible(exts[i])) {
|
||||||
configMap.put(exts[i].getUniqueIdentifier(), new BinaryParserConfiguration(exts[i]));
|
configMap.put(exts[i].getUniqueIdentifier(), new BinaryParserConfiguration(exts[i]));
|
||||||
|
@ -224,7 +224,7 @@ public class BinaryParsTab extends AbstractCPropertyTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initializeParserPageMap() {
|
private void initializeParserPageMap() {
|
||||||
fParserPageMap = new HashMap(5);
|
fParserPageMap = new HashMap<String, BinaryParserPageConfiguration>(5);
|
||||||
|
|
||||||
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(CUIPlugin.PLUGIN_ID, "BinaryParserPage"); //$NON-NLS-1$
|
IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(CUIPlugin.PLUGIN_ID, "BinaryParserPage"); //$NON-NLS-1$
|
||||||
IConfigurationElement[] infos = extensionPoint.getConfigurationElements();
|
IConfigurationElement[] infos = extensionPoint.getConfigurationElements();
|
||||||
|
@ -281,11 +281,11 @@ public class BinaryParsTab extends AbstractCPropertyTab {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String[] getBinaryParserIDs() {
|
protected String[] getBinaryParserIDs() {
|
||||||
return (String[]) configMap.keySet().toArray(new String[configMap.keySet().size()]);
|
return configMap.keySet().toArray(new String[configMap.keySet().size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ICOptionPage getBinaryParserPage(String parserID) {
|
protected ICOptionPage getBinaryParserPage(String parserID) {
|
||||||
BinaryParserPageConfiguration configElement = (BinaryParserPageConfiguration) fParserPageMap.get(parserID);
|
BinaryParserPageConfiguration configElement = fParserPageMap.get(parserID);
|
||||||
if (configElement != null) {
|
if (configElement != null) {
|
||||||
try {
|
try {
|
||||||
return configElement.getPage();
|
return configElement.getPage();
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class CDTPrefUtil {
|
||||||
public static final String NULL = "NULL"; //$NON-NLS-1$
|
public static final String NULL = "NULL"; //$NON-NLS-1$
|
||||||
private static final IPreferenceStore pref = CUIPlugin.getDefault().getPreferenceStore();
|
private static final IPreferenceStore pref = CUIPlugin.getDefault().getPreferenceStore();
|
||||||
private static final String DELIMITER = " "; //$NON-NLS-1$
|
private static final String DELIMITER = " "; //$NON-NLS-1$
|
||||||
private static LinkedList preferredTCs = null;
|
private static LinkedList<String> preferredTCs = null;
|
||||||
|
|
||||||
// low-level methods
|
// low-level methods
|
||||||
public static boolean getBool(String key) { return pref.getBoolean(key); }
|
public static boolean getBool(String key) { return pref.getBoolean(key); }
|
||||||
|
@ -66,9 +66,9 @@ public class CDTPrefUtil {
|
||||||
|
|
||||||
// up-level methods
|
// up-level methods
|
||||||
public static void readPreferredTCs() {
|
public static void readPreferredTCs() {
|
||||||
preferredTCs = new LinkedList(Arrays.asList(getStr(KEY_PREFTC).split(DELIMITER)));
|
preferredTCs = new LinkedList<String>(Arrays.asList(getStr(KEY_PREFTC).split(DELIMITER)));
|
||||||
}
|
}
|
||||||
public static List getPreferredTCs() {
|
public static List<String> getPreferredTCs() {
|
||||||
if (preferredTCs == null) readPreferredTCs();
|
if (preferredTCs == null) readPreferredTCs();
|
||||||
return preferredTCs;
|
return preferredTCs;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -46,7 +46,7 @@ import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
*/
|
*/
|
||||||
public class CDTPropertyManager {
|
public class CDTPropertyManager {
|
||||||
|
|
||||||
private static ArrayList pages = new ArrayList();
|
private static ArrayList<Object> pages = new ArrayList<Object>();
|
||||||
private static ICProjectDescription prjd = null;
|
private static ICProjectDescription prjd = null;
|
||||||
private static boolean saveDone = false;
|
private static boolean saveDone = false;
|
||||||
private static IProject project = null;
|
private static IProject project = null;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -27,8 +27,8 @@ import org.eclipse.jface.viewers.Viewer;
|
||||||
import org.eclipse.jface.viewers.ViewerFilter;
|
import org.eclipse.jface.viewers.ViewerFilter;
|
||||||
import org.eclipse.jface.window.Window;
|
import org.eclipse.jface.window.Window;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
|
import org.eclipse.swt.events.SelectionAdapter;
|
||||||
import org.eclipse.swt.events.SelectionEvent;
|
import org.eclipse.swt.events.SelectionEvent;
|
||||||
import org.eclipse.swt.events.SelectionListener;
|
|
||||||
import org.eclipse.swt.graphics.Image;
|
import org.eclipse.swt.graphics.Image;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.layout.GridLayout;
|
import org.eclipse.swt.layout.GridLayout;
|
||||||
|
@ -55,7 +55,7 @@ public abstract class CLocationTab extends AbstractCPropertyTab {
|
||||||
|
|
||||||
Label label;
|
Label label;
|
||||||
TreeViewer tree;
|
TreeViewer tree;
|
||||||
ArrayList src;
|
ArrayList<_Entry> src;
|
||||||
ICResourceDescription cfgd;
|
ICResourceDescription cfgd;
|
||||||
ICProject cprj;
|
ICProject cprj;
|
||||||
|
|
||||||
|
@ -71,17 +71,21 @@ public abstract class CLocationTab extends AbstractCPropertyTab {
|
||||||
|
|
||||||
public String[] getExts() {
|
public String[] getExts() {
|
||||||
IPath[] p = getExtPaths();
|
IPath[] p = getExtPaths();
|
||||||
if (p == null || p.length == 0) return new String[0];
|
if (p == null || p.length == 0)
|
||||||
|
return new String[0];
|
||||||
String[] s = new String[p.length];
|
String[] s = new String[p.length];
|
||||||
for (int i=0; i<p.length; i++) s[i] = p[i].toOSString();
|
for (int i=0; i<p.length; i++)
|
||||||
|
s[i] = p[i].toOSString();
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
String[] s = getExts();
|
String[] s = getExts();
|
||||||
if (s.length == 0) return UIMessages.getString("CLocationTab.0"); //$NON-NLS-1$
|
if (s.length == 0)
|
||||||
|
return UIMessages.getString("CLocationTab.0"); //$NON-NLS-1$
|
||||||
String x = UIMessages.getString("CLocationTab.1"); //$NON-NLS-1$
|
String x = UIMessages.getString("CLocationTab.1"); //$NON-NLS-1$
|
||||||
for (int i=0; i< s.length; i++) x = x + s[i] + UIMessages.getString("CLocationTab.2"); //$NON-NLS-1$
|
for (int i=0; i< s.length; i++)
|
||||||
|
x = x + s[i] + UIMessages.getString("CLocationTab.2"); //$NON-NLS-1$
|
||||||
x = x.substring(0, x.length() - 2) + UIMessages.getString("CLocationTab.3"); //$NON-NLS-1$
|
x = x.substring(0, x.length() - 2) + UIMessages.getString("CLocationTab.3"); //$NON-NLS-1$
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
@ -114,11 +118,7 @@ public abstract class CLocationTab extends AbstractCPropertyTab {
|
||||||
label.setLayoutData(new GridData(GridData.BEGINNING));
|
label.setLayoutData(new GridData(GridData.BEGINNING));
|
||||||
tree = new TreeViewer(usercomp);
|
tree = new TreeViewer(usercomp);
|
||||||
tree.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
|
tree.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||||
tree.getTree().addSelectionListener(new SelectionListener() {
|
tree.getTree().addSelectionListener(new SelectionAdapter() {
|
||||||
public void widgetDefaultSelected(SelectionEvent e) {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
updateButtons();
|
updateButtons();
|
||||||
}});
|
}});
|
||||||
|
@ -240,11 +240,9 @@ public abstract class CLocationTab extends AbstractCPropertyTab {
|
||||||
usercomp.setVisible(true);
|
usercomp.setVisible(true);
|
||||||
|
|
||||||
cfgd = _cfgd;
|
cfgd = _cfgd;
|
||||||
ICExclusionPatternPathEntry[] ent = getEntries(cfgd);
|
src = new ArrayList<_Entry>();
|
||||||
src = new ArrayList(ent.length);
|
for (ICExclusionPatternPathEntry e : getEntries(cfgd))
|
||||||
for (int i=0; i<ent.length; i++) {
|
src.add(new _Entry(e));
|
||||||
src.add(new _Entry(ent[i]));
|
|
||||||
}
|
|
||||||
tree.setInput(src);
|
tree.setInput(src);
|
||||||
// get CProject
|
// get CProject
|
||||||
IAdaptable ad = page.getElement();
|
IAdaptable ad = page.getElement();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -69,7 +69,7 @@ public class EnvironmentTab extends AbstractCPropertyTab {
|
||||||
|
|
||||||
private Table table;
|
private Table table;
|
||||||
private TableViewer tv;
|
private TableViewer tv;
|
||||||
private ArrayList data = new ArrayList();
|
private ArrayList<TabData> data = new ArrayList<TabData>();
|
||||||
private Button b1, b2;
|
private Button b1, b2;
|
||||||
|
|
||||||
private ICConfigurationDescription cfgd = null;
|
private ICConfigurationDescription cfgd = null;
|
||||||
|
@ -162,9 +162,10 @@ public class EnvironmentTab extends AbstractCPropertyTab {
|
||||||
tv = new TableViewer(table);
|
tv = new TableViewer(table);
|
||||||
tv.setContentProvider(new IStructuredContentProvider() {
|
tv.setContentProvider(new IStructuredContentProvider() {
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public Object[] getElements(Object inputElement) {
|
public Object[] getElements(Object inputElement) {
|
||||||
if (inputElement != null && inputElement instanceof ArrayList) {
|
if (inputElement != null && inputElement instanceof ArrayList) {
|
||||||
ArrayList ar = (ArrayList)inputElement;
|
ArrayList<Object> ar = (ArrayList)inputElement;
|
||||||
return ar.toArray(new TabData[0]);
|
return ar.toArray(new TabData[0]);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -36,10 +36,10 @@ import org.eclipse.cdt.core.settings.model.ICResourceDescription;
|
||||||
|
|
||||||
|
|
||||||
public class ErrorParsTab extends AbstractCPropertyTab {
|
public class ErrorParsTab extends AbstractCPropertyTab {
|
||||||
protected HashMap mapParsers = new HashMap();
|
private HashMap<String, String> mapParsers = new HashMap<String, String>();
|
||||||
protected Table table;
|
private Table table;
|
||||||
protected CheckboxTableViewer tv;
|
private CheckboxTableViewer tv;
|
||||||
ICConfigurationDescription cfgd;
|
private ICConfigurationDescription cfgd;
|
||||||
|
|
||||||
public void createControls(Composite parent) {
|
public void createControls(Composite parent) {
|
||||||
super.createControls(parent);
|
super.createControls(parent);
|
||||||
|
@ -146,12 +146,12 @@ public class ErrorParsTab extends AbstractCPropertyTab {
|
||||||
((ICMultiConfigDescription)cfgd).getErrorParserIDs() :
|
((ICMultiConfigDescription)cfgd).getErrorParserIDs() :
|
||||||
cfgd.getBuildSetting().getErrorParserIDs();
|
cfgd.getBuildSetting().getErrorParserIDs();
|
||||||
|
|
||||||
ArrayList data = new ArrayList(mapParsers.size());
|
ArrayList<TableData> data = new ArrayList<TableData>(mapParsers.size());
|
||||||
ArrayList checked = new ArrayList(ss.length);
|
ArrayList<TableData> checked = new ArrayList<TableData>(ss.length);
|
||||||
HashMap cloneMap = new HashMap(mapParsers);
|
HashMap<String, String> cloneMap = new HashMap<String, String>(mapParsers);
|
||||||
// add checked elements
|
// add checked elements
|
||||||
for (int i=0; i<ss.length; i++) {
|
for (int i=0; i<ss.length; i++) {
|
||||||
String s = (String)cloneMap.get(ss[i]);
|
String s = cloneMap.get(ss[i]);
|
||||||
if (s != null) {
|
if (s != null) {
|
||||||
TableData d = new TableData(ss[i],s);
|
TableData d = new TableData(ss[i],s);
|
||||||
data.add(d);
|
data.add(d);
|
||||||
|
@ -163,7 +163,7 @@ public class ErrorParsTab extends AbstractCPropertyTab {
|
||||||
Iterator it = cloneMap.keySet().iterator();
|
Iterator it = cloneMap.keySet().iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
String s = (String)it.next();
|
String s = (String)it.next();
|
||||||
data.add(new TableData(s, (String)cloneMap.get(s)));
|
data.add(new TableData(s, cloneMap.get(s)));
|
||||||
}
|
}
|
||||||
tv.setInput(data.toArray());
|
tv.setInput(data.toArray());
|
||||||
tv.setCheckedElements(checked.toArray());
|
tv.setCheckedElements(checked.toArray());
|
||||||
|
@ -193,12 +193,12 @@ public class ErrorParsTab extends AbstractCPropertyTab {
|
||||||
|
|
||||||
private void saveChecked() {
|
private void saveChecked() {
|
||||||
Object[] objs = tv.getCheckedElements();
|
Object[] objs = tv.getCheckedElements();
|
||||||
ArrayList lst = new ArrayList();
|
ArrayList<String> lst = new ArrayList<String>();
|
||||||
if (objs != null) {
|
if (objs != null) {
|
||||||
for (int i=0; i<objs.length; i++)
|
for (Object ob : objs)
|
||||||
lst.add(((TableData)objs[i]).key);
|
lst.add(((TableData)ob).key);
|
||||||
}
|
}
|
||||||
String[] s = (String[])lst.toArray(new String[lst.size()]);
|
String[] s = lst.toArray(new String[lst.size()]);
|
||||||
if (cfgd instanceof ICMultiConfigDescription)
|
if (cfgd instanceof ICMultiConfigDescription)
|
||||||
((ICMultiConfigDescription)cfgd).setErrorParserIDs(s);
|
((ICMultiConfigDescription)cfgd).setErrorParserIDs(s);
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2007 QNX Software Systems and others.
|
* Copyright (c) 2004, 2008 QNX Software Systems and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -110,10 +110,9 @@ public class ExPatternDialog extends StatusDialog {
|
||||||
fCurrSourceFolder= (IContainer) res;
|
fCurrSourceFolder= (IContainer) res;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList elements= new ArrayList(pattern.length);
|
ArrayList<String> elements= new ArrayList<String>(pattern.length);
|
||||||
for (int i= 0; i < pattern.length; i++) {
|
for (IPath p : pattern)
|
||||||
elements.add(pattern[i].toString());
|
elements.add(p.toString());
|
||||||
}
|
|
||||||
fExclusionPatternList.setElements(elements);
|
fExclusionPatternList.setElements(elements);
|
||||||
fExclusionPatternList.selectFirstElement();
|
fExclusionPatternList.selectFirstElement();
|
||||||
fExclusionPatternList.enableButton(IDX_ADD_MULTIPLE, fCurrSourceFolder != null);
|
fExclusionPatternList.enableButton(IDX_ADD_MULTIPLE, fCurrSourceFolder != null);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -74,22 +74,22 @@ public class ManageConfigSelector {
|
||||||
* @return array with only new-style projects included
|
* @return array with only new-style projects included
|
||||||
*/
|
*/
|
||||||
public static IProject[] getProjects(Object[] obs) {
|
public static IProject[] getProjects(Object[] obs) {
|
||||||
ArrayList lst = new ArrayList();
|
ArrayList<IProject> lst = new ArrayList<IProject>();
|
||||||
if (obs != null) {
|
if (obs != null) {
|
||||||
for (int i=0; i<obs.length; i++) {
|
for (Object ob : obs) {
|
||||||
IProject prj = null;
|
IProject prj = null;
|
||||||
// Extract project from selection
|
// Extract project from selection
|
||||||
if (obs[i] instanceof ICElement) { // for C/C++ view
|
if (ob instanceof ICElement) { // for C/C++ view
|
||||||
prj = ((ICElement)obs[i]).getCProject().getProject();
|
prj = ((ICElement)ob).getCProject().getProject();
|
||||||
} else if (obs[i] instanceof IResource) { // for other views
|
} else if (ob instanceof IResource) { // for other views
|
||||||
prj = ((IResource)obs[i]).getProject();
|
prj = ((IResource)ob).getProject();
|
||||||
/* get project from Include folder elements */
|
/* get project from Include folder elements */
|
||||||
} else if (obs[i] instanceof IncludeRefContainer) {
|
} else if (ob instanceof IncludeRefContainer) {
|
||||||
ICProject fCProject = ((IncludeRefContainer)obs[i]).getCProject();
|
ICProject fCProject = ((IncludeRefContainer)ob).getCProject();
|
||||||
if (fCProject != null)
|
if (fCProject != null)
|
||||||
prj = fCProject.getProject();
|
prj = fCProject.getProject();
|
||||||
} else if (obs[i] instanceof IncludeReferenceProxy) {
|
} else if (ob instanceof IncludeReferenceProxy) {
|
||||||
IncludeRefContainer irc = ((IncludeReferenceProxy)obs[i]).getIncludeRefContainer();
|
IncludeRefContainer irc = ((IncludeReferenceProxy)ob).getIncludeRefContainer();
|
||||||
if (irc != null) {
|
if (irc != null) {
|
||||||
ICProject fCProject = irc.getCProject();
|
ICProject fCProject = irc.getCProject();
|
||||||
if (fCProject != null)
|
if (fCProject != null)
|
||||||
|
@ -103,7 +103,7 @@ public class ManageConfigSelector {
|
||||||
lst.add(prj);
|
lst.add(prj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (IProject[])lst.toArray(new IProject[lst.size()]);
|
return lst.toArray(new IProject[lst.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void readMgrs() {
|
private static void readMgrs() {
|
||||||
|
@ -118,7 +118,7 @@ public class ManageConfigSelector {
|
||||||
if (extensions == null)
|
if (extensions == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ArrayList list = new ArrayList();
|
ArrayList<IConfigManager> list = new ArrayList<IConfigManager>();
|
||||||
for (int i = 0; i < extensions.length; ++i) {
|
for (int i = 0; i < extensions.length; ++i) {
|
||||||
IConfigurationElement[] elements = extensions[i].getConfigurationElements();
|
IConfigurationElement[] elements = extensions[i].getConfigurationElements();
|
||||||
for (int k = 0; k < elements.length; k++) {
|
for (int k = 0; k < elements.length; k++) {
|
||||||
|
@ -134,6 +134,6 @@ public class ManageConfigSelector {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
list.add(ManageConfigRunner.getDefault()); // Default manager
|
list.add(ManageConfigRunner.getDefault()); // Default manager
|
||||||
mgrs = (IConfigManager[]) list.toArray(new IConfigManager[list.size()]);
|
mgrs = list.toArray(new IConfigManager[list.size()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -403,6 +403,7 @@ DiscoveredScannerConfigurationContainerPage.initialization.error.message=Error i
|
||||||
|
|
||||||
AbstractCPropertyTab.0=Select build variable
|
AbstractCPropertyTab.0=Select build variable
|
||||||
AbstractCPropertyTab.1=Variables...
|
AbstractCPropertyTab.1=Variables...
|
||||||
|
AbstractCPropertyTab.2=This tab is not supported in multi-configuration mode
|
||||||
AbstractPage.0=Unknown element selected
|
AbstractPage.0=Unknown element selected
|
||||||
AbstractPage.1=This file has no properties to display
|
AbstractPage.1=This file has no properties to display
|
||||||
AbstractPage.12=Manage configurations
|
AbstractPage.12=Manage configurations
|
||||||
|
|
|
@ -117,20 +117,17 @@ public class RefsTab extends AbstractCPropertyTab {
|
||||||
|
|
||||||
public void updateData(ICResourceDescription cfgd) {
|
public void updateData(ICResourceDescription cfgd) {
|
||||||
if (page.isMultiCfg()) {
|
if (page.isMultiCfg()) {
|
||||||
usercomp.setVisible(false);
|
setAllVisible(false, null);
|
||||||
buttoncomp.setVisible(false);
|
|
||||||
} else {
|
} else {
|
||||||
if ( !usercomp.getVisible()) {
|
if ( !usercomp.getVisible())
|
||||||
usercomp.setVisible(true);
|
setAllVisible(true, null);
|
||||||
buttoncomp.setVisible(true);
|
|
||||||
}
|
|
||||||
initData();
|
initData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveChecked() {
|
private void saveChecked() {
|
||||||
TreeItem[] tr = tree.getItems();
|
TreeItem[] tr = tree.getItems();
|
||||||
Map refs = new HashMap();
|
Map<String, String> refs = new HashMap<String, String>();
|
||||||
for (int i=0; i<tr.length; i++) {
|
for (int i=0; i<tr.length; i++) {
|
||||||
if (tr[i].getChecked()) {
|
if (tr[i].getChecked()) {
|
||||||
TreeItem[] cfgs = tr[i].getItems();
|
TreeItem[] cfgs = tr[i].getItems();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -74,8 +74,8 @@ public class SymbolTab extends AbstractLangsListTab {
|
||||||
int x = table.getSelectionIndex();
|
int x = table.getSelectionIndex();
|
||||||
if (x == -1) x = 0;
|
if (x == -1) x = 0;
|
||||||
|
|
||||||
ArrayList lst = new ArrayList();
|
ArrayList<ICLanguageSettingEntry> lst = new ArrayList<ICLanguageSettingEntry>();
|
||||||
incs = new LinkedList(lang.getSettingEntriesList(getKind()));
|
incs = new LinkedList<ICLanguageSettingEntry>(lang.getSettingEntriesList(getKind()));
|
||||||
if (incs != null) {
|
if (incs != null) {
|
||||||
Iterator it = incs.iterator();
|
Iterator it = incs.iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2004, 2007 IBM Corporation and others.
|
* Copyright (c) 2004, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -32,11 +32,11 @@ public class UIMessages {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getFormattedString(String key, String arg) {
|
public static String getFormattedString(String key, String arg) {
|
||||||
return MessageFormat.format(getString(key), new String[] { arg });
|
return MessageFormat.format(getString(key), (Object[])new String[] { arg });
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getFormattedString(String key, String[] args) {
|
public static String getFormattedString(String key, String[] args) {
|
||||||
return MessageFormat.format(getString(key), args);
|
return MessageFormat.format(getString(key), (Object[])args);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getString(String key) {
|
public static String getString(String key) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2002, 2007 Rational Software Corporation and others.
|
* Copyright (c) 2002, 2008 Rational Software Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -77,6 +77,7 @@ implements IExecutableExtension, IWizardWithMemory
|
||||||
setDialogSettings(CUIPlugin.getDefault().getDialogSettings());
|
setDialogSettings(CUIPlugin.getDefault().getDialogSettings());
|
||||||
setNeedsProgressMonitor(true);
|
setNeedsProgressMonitor(true);
|
||||||
setForcePreviousAndNextButtons(true);
|
setForcePreviousAndNextButtons(true);
|
||||||
|
setWindowTitle(title);
|
||||||
wz_title = title;
|
wz_title = title;
|
||||||
wz_desc = desc;
|
wz_desc = desc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -261,7 +261,7 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
IExtension[] extensions = extensionPoint.getExtensions();
|
IExtension[] extensions = extensionPoint.getExtensions();
|
||||||
if (extensions == null) return null;
|
if (extensions == null) return null;
|
||||||
|
|
||||||
List items = new ArrayList();
|
List<EntryDescriptor> items = new ArrayList<EntryDescriptor>();
|
||||||
for (int i = 0; i < extensions.length; ++i) {
|
for (int i = 0; i < extensions.length; ++i) {
|
||||||
IConfigurationElement[] elements = extensions[i].getConfigurationElements();
|
IConfigurationElement[] elements = extensions[i].getConfigurationElements();
|
||||||
for (int k = 0; k < elements.length; k++) {
|
for (int k = 0; k < elements.length; k++) {
|
||||||
|
@ -274,10 +274,9 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (w == null) return null;
|
if (w == null) return null;
|
||||||
|
|
||||||
w.setDependentControl(right, ls);
|
w.setDependentControl(right, ls);
|
||||||
EntryDescriptor[] wd = w.createItems(show_sup.getSelection(), wizard);
|
for (EntryDescriptor ed : w.createItems(show_sup.getSelection(), wizard))
|
||||||
for (int x=0; x<wd.length; x++) items.add(wd[x]);
|
items.add(ed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -305,15 +304,13 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void addItemsToTree(Tree tree, List items) {
|
private static void addItemsToTree(Tree tree, List<EntryDescriptor> items) {
|
||||||
// Sorting is disabled because of users requests
|
// Sorting is disabled because of users requests
|
||||||
// Collections.sort(items, CDTListComparator.getInstance());
|
// Collections.sort(items, CDTListComparator.getInstance());
|
||||||
|
|
||||||
ArrayList placedTreeItemsList = new ArrayList(items.size());
|
ArrayList<TreeItem> placedTreeItemsList = new ArrayList<TreeItem>(items.size());
|
||||||
ArrayList placedEntryDescriptorsList = new ArrayList(items.size());
|
ArrayList<EntryDescriptor> placedEntryDescriptorsList = new ArrayList<EntryDescriptor>(items.size());
|
||||||
Iterator it = items.iterator();
|
for (EntryDescriptor wd : items) {
|
||||||
while (it.hasNext()) {
|
|
||||||
EntryDescriptor wd = (EntryDescriptor)it.next();
|
|
||||||
if (wd.getParentId() == null) {
|
if (wd.getParentId() == null) {
|
||||||
wd.setPath(wd.getId());
|
wd.setPath(wd.getId());
|
||||||
TreeItem ti = new TreeItem(tree, SWT.NONE);
|
TreeItem ti = new TreeItem(tree, SWT.NONE);
|
||||||
|
@ -332,7 +329,7 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
EntryDescriptor wd1 = (EntryDescriptor)it2.next();
|
EntryDescriptor wd1 = (EntryDescriptor)it2.next();
|
||||||
if (wd1.getParentId() == null) continue;
|
if (wd1.getParentId() == null) continue;
|
||||||
for (int i=0; i<placedEntryDescriptorsList.size(); i++) {
|
for (int i=0; i<placedEntryDescriptorsList.size(); i++) {
|
||||||
EntryDescriptor wd2 = (EntryDescriptor)placedEntryDescriptorsList.get(i);
|
EntryDescriptor wd2 = placedEntryDescriptorsList.get(i);
|
||||||
if (wd2.getId().equals(wd1.getParentId())) {
|
if (wd2.getId().equals(wd1.getParentId())) {
|
||||||
found = true;
|
found = true;
|
||||||
wd1.setParentId(null);
|
wd1.setParentId(null);
|
||||||
|
@ -347,7 +344,7 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
if (h != null && !h.isApplicable(wd1))
|
if (h != null && !h.isApplicable(wd1))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
TreeItem p = (TreeItem)placedTreeItemsList.get(i);
|
TreeItem p = placedTreeItemsList.get(i);
|
||||||
TreeItem ti = new TreeItem(p, SWT.NONE);
|
TreeItem ti = new TreeItem(p, SWT.NONE);
|
||||||
ti.setText(wd1.getName());
|
ti.setText(wd1.getName());
|
||||||
ti.setData(wd1.getHandler());
|
ti.setData(wd1.getHandler());
|
||||||
|
@ -406,6 +403,7 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
return IMG_ITEM;
|
return IMG_ITEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public List filterItems(List items) {
|
public List filterItems(List items) {
|
||||||
return items;
|
return items;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -66,7 +66,7 @@ public class CWizardHandler implements Cloneable {
|
||||||
* @parame pane - parent for handler-specific data
|
* @parame pane - parent for handler-specific data
|
||||||
*/
|
*/
|
||||||
public void handleSelection() {
|
public void handleSelection() {
|
||||||
List preferred = CDTPrefUtil.getPreferredTCs();
|
List<String> preferred = CDTPrefUtil.getPreferredTCs();
|
||||||
if (table == null) {
|
if (table == null) {
|
||||||
table = new Table(parent, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
|
table = new Table(parent, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
|
||||||
TableItem ti = new TableItem(table, SWT.NONE);
|
TableItem ti = new TableItem(table, SWT.NONE);
|
||||||
|
@ -130,7 +130,7 @@ public class CWizardHandler implements Cloneable {
|
||||||
* Usually, marks preferred toolchains somehow (icon, font etc)
|
* Usually, marks preferred toolchains somehow (icon, font etc)
|
||||||
* @param prefs - list of strings (preferred Toolchain IDs)
|
* @param prefs - list of strings (preferred Toolchain IDs)
|
||||||
*/
|
*/
|
||||||
public void updatePreferred(List prefs) {}
|
public void updatePreferred(List<String> prefs) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates project
|
* Creates project
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Intel Corporation and others.
|
* Copyright (c) 2007, 2008 Intel Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -44,6 +44,6 @@ public interface IWizardItemsListListener {
|
||||||
* @param items - list of EntryDescriptor objects
|
* @param items - list of EntryDescriptor objects
|
||||||
* @return - list with filtered items
|
* @return - list with filtered items
|
||||||
*/
|
*/
|
||||||
List filterItems(List items);
|
List<EntryDescriptor> filterItems(List items);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -693,9 +693,10 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
|
||||||
*
|
*
|
||||||
* @return array of <code>IBaseClassInfo</code>
|
* @return array of <code>IBaseClassInfo</code>
|
||||||
*/
|
*/
|
||||||
protected IBaseClassInfo[] getBaseClasses() {
|
@SuppressWarnings("unchecked")
|
||||||
List classesList = fBaseClassesDialogField.getElements();
|
protected IBaseClassInfo[] getBaseClasses() {
|
||||||
return (IBaseClassInfo[]) classesList.toArray(new IBaseClassInfo[classesList.size()]);
|
List<IBaseClassInfo> classesList = fBaseClassesDialogField.getElements();
|
||||||
|
return classesList.toArray(new IBaseClassInfo[classesList.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Symbian Software Limited and others.
|
* Copyright (c) 2007, 2008 Symbian Software Limited and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -25,7 +25,7 @@ public interface IWizardDataPage extends IWizardPage {
|
||||||
* @return a map of (key,value) pairs that should be added to the
|
* @return a map of (key,value) pairs that should be added to the
|
||||||
* associated project template's value store.
|
* associated project template's value store.
|
||||||
*/
|
*/
|
||||||
Map/*<String, String>*/ getPageData();
|
Map<String, String> getPageData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the page that follows this one. Implementations must ensure
|
* Set the page that follows this one. Implementations must ensure
|
||||||
|
|
|
@ -146,9 +146,9 @@ public class ProjectSelectionPage extends WizardPage implements IWizardDataPage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map data = new HashMap(2);
|
private Map<String, String> data = new HashMap<String, String>(2);
|
||||||
|
|
||||||
public Map getPageData() {
|
public Map<String, String> getPageData() {
|
||||||
String cPojectName = currentCProject.getResource().getName().trim();
|
String cPojectName = currentCProject.getResource().getName().trim();
|
||||||
data.put("projectName", cPojectName); //$NON-NLS-1$
|
data.put("projectName", cPojectName); //$NON-NLS-1$
|
||||||
data.put("baseName", getBaseName(cPojectName)); //$NON-NLS-1$
|
data.put("baseName", getBaseName(cPojectName)); //$NON-NLS-1$
|
||||||
|
|
|
@ -30,16 +30,16 @@ public class NewProjectCreationPage extends WizardNewProjectCreationPage impleme
|
||||||
private static final String ERROR_SUFFIX_TOO_LONG = Messages.getString("NewProjectCreationPage.1"); //$NON-NLS-1$
|
private static final String ERROR_SUFFIX_TOO_LONG = Messages.getString("NewProjectCreationPage.1"); //$NON-NLS-1$
|
||||||
private static final Status OK_STATUS = new Status(IStatus.OK, CUIPlugin.getPluginId(), 0, "", null); //$NON-NLS-1$
|
private static final Status OK_STATUS = new Status(IStatus.OK, CUIPlugin.getPluginId(), 0, "", null); //$NON-NLS-1$
|
||||||
|
|
||||||
private Map data;
|
private Map<String, String> data;
|
||||||
private IWizardPage next;
|
private IWizardPage next;
|
||||||
|
|
||||||
public NewProjectCreationPage(String name) {
|
public NewProjectCreationPage(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
data= new HashMap();
|
data= new HashMap<String, String>();
|
||||||
this.setDescription(Messages.getString("NewProjectCreationPage.3")); //$NON-NLS-1$
|
this.setDescription(Messages.getString("NewProjectCreationPage.3")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map getPageData() {
|
public Map<String, String> getPageData() {
|
||||||
String projName = super.getProjectName().trim();
|
String projName = super.getProjectName().trim();
|
||||||
data.put("projectName", projName); //$NON-NLS-1$
|
data.put("projectName", projName); //$NON-NLS-1$
|
||||||
data.put("baseName", getBaseName(projName)); //$NON-NLS-1$
|
data.put("baseName", getBaseName(projName)); //$NON-NLS-1$
|
||||||
|
|
|
@ -131,7 +131,7 @@ public abstract class UIPage extends DialogPage {
|
||||||
*
|
*
|
||||||
* @return HashMap. The data contained in the widgets on this page.
|
* @return HashMap. The data contained in the widgets on this page.
|
||||||
*/
|
*/
|
||||||
public Map/*<String, String>*/ getPageData() {
|
public Map<String, String> getPageData() {
|
||||||
return uiElement.getValues();
|
return uiElement.getValues();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2007 Symbian Software Limited and others.
|
* Copyright (c) 2007, 2008 Symbian Software Limited and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -40,7 +40,7 @@ public class UIWizardPage extends UIPage implements IWizardDataPage, PatternEven
|
||||||
* This map will contain reference to the source widgets, which has generated the
|
* This map will contain reference to the source widgets, which has generated the
|
||||||
* SWT events. If this map contains an event source, the error message will not be cleared.
|
* SWT events. If this map contains an event source, the error message will not be cleared.
|
||||||
*/
|
*/
|
||||||
HashMap/*<Object, String>*/ validInvalid;
|
HashMap<Object, String> validInvalid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Page Name
|
* Page Name
|
||||||
|
@ -77,7 +77,7 @@ public class UIWizardPage extends UIPage implements IWizardDataPage, PatternEven
|
||||||
public UIWizardPage(String title, String pageName, UIElement uiElement, Map/*<String, String>*/ valueStore) {
|
public UIWizardPage(String title, String pageName, UIElement uiElement, Map/*<String, String>*/ valueStore) {
|
||||||
super(title, uiElement, valueStore);
|
super(title, uiElement, valueStore);
|
||||||
name = pageName;
|
name = pageName;
|
||||||
validInvalid = new HashMap/*<Object, String>*/();
|
validInvalid = new HashMap<Object, String>();
|
||||||
isPageComplete = uiElement.isValid();
|
isPageComplete = uiElement.isValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -312,13 +312,12 @@ public class UIWizardPage extends UIPage implements IWizardDataPage, PatternEven
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String getErrorString() {
|
private String getErrorString() {
|
||||||
Iterator iterator = validInvalid.keySet().iterator();
|
Iterator<Object> iterator = validInvalid.keySet().iterator();
|
||||||
String message = ""; //$NON-NLS-1$
|
String message = ""; //$NON-NLS-1$
|
||||||
|
|
||||||
// only display one error message at a time
|
// only display one error message at a time
|
||||||
if (iterator.hasNext()) {
|
if (iterator.hasNext()) {
|
||||||
|
message = validInvalid.get(iterator.next());
|
||||||
message = (String) validInvalid.get(iterator.next());
|
|
||||||
}
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ public abstract class UIElement {
|
||||||
* get The values as a HashMap. This method is called recursively on all the childrens, if the UIElement instance on which this mehtod called is a GenericUIElementGroup.
|
* get The values as a HashMap. This method is called recursively on all the childrens, if the UIElement instance on which this mehtod called is a GenericUIElementGroup.
|
||||||
* @return HashMap.
|
* @return HashMap.
|
||||||
*/
|
*/
|
||||||
public abstract Map/*<String, String>*/ getValues();
|
public abstract Map<String, String> getValues();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method adds UIWidets to UIComposite. This method is called
|
* This method adds UIWidets to UIComposite. This method is called
|
||||||
|
|
Loading…
Add table
Reference in a new issue