1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-21 16:05:25 +02:00

Fixed all remaining warnings in the plugins: cdt.ui, cdt.ui.tests, cdt.refactoring.

This commit is contained in:
Markus Schorn 2006-07-10 08:03:29 +00:00
parent 33ebd6b7b9
commit 33408eb6f0
80 changed files with 297 additions and 460 deletions

View file

@ -1,8 +1,8 @@
#Wed Jul 05 15:17:10 EDT 2006 #Mon Jul 10 09:33:48 CEST 2006
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning org.eclipse.jdt.core.compiler.problem.deprecation=ignore
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore

View file

@ -361,7 +361,7 @@ public class CPPPopulateASTViewAction extends CPPASTVisitor implements IPopulate
// loop through the includes and make sure that all of the nodes // loop through the includes and make sure that all of the nodes
// that are children of the TU are in the proper include (based on offset) // that are children of the TU are in the proper include (based on offset)
DOMASTNodeLeaf child = null; DOMASTNodeLeaf child = null;
outerLoop: for (int i=treeIncludes.length - 1; i >= 0; i-- ) { for (int i=treeIncludes.length - 1; i >= 0; i-- ) {
if (treeIncludes[i] == null) continue; if (treeIncludes[i] == null) continue;
IASTNode node = null; IASTNode node = null;

View file

@ -325,7 +325,7 @@ public class CPopulateASTViewAction extends CASTVisitor implements IPopulateDOMA
// loop through the includes and make sure that all of the nodes // loop through the includes and make sure that all of the nodes
// that are children of the TU are in the proper include (based on offset) // that are children of the TU are in the proper include (based on offset)
DOMASTNodeLeaf child = null; DOMASTNodeLeaf child = null;
outerLoop: for (int i=treeIncludes.length-1; i>=0; i--) { for (int i=treeIncludes.length-1; i>=0; i--) {
if (treeIncludes[i] == null) continue; if (treeIncludes[i] == null) continue;
IASTNode node = null; IASTNode node = null;

View file

@ -10,6 +10,59 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.ui.tests.DOMAST; package org.eclipse.cdt.ui.tests.DOMAST;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IContentProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.DrillDownAdapter;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.eclipse.ui.views.properties.PropertySheet;
import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.dom.CDOM; import org.eclipse.cdt.core.dom.CDOM;
import org.eclipse.cdt.core.dom.IASTServiceProvider; import org.eclipse.cdt.core.dom.IASTServiceProvider;
@ -43,71 +96,20 @@ import org.eclipse.cdt.core.dom.ast.cpp.CPPASTVisitor;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer;
import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateParameter;
import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.model.ITranslationUnit; import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.internal.core.model.CProject;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.parser.ParserLanguage; import org.eclipse.cdt.core.parser.ParserLanguage;
import org.eclipse.cdt.core.parser.ParserUtil; import org.eclipse.cdt.core.parser.ParserUtil;
import org.eclipse.cdt.core.parser.ast.IASTEnumerator; import org.eclipse.cdt.core.parser.ast.IASTEnumerator;
import org.eclipse.cdt.core.resources.FileStorage; import org.eclipse.cdt.core.resources.FileStorage;
import org.eclipse.cdt.internal.ui.editor.CEditor;
import org.eclipse.cdt.internal.ui.util.EditorUtility;
import org.eclipse.cdt.ui.actions.CustomFiltersActionGroup; import org.eclipse.cdt.ui.actions.CustomFiltersActionGroup;
import org.eclipse.cdt.ui.testplugin.CTestPlugin; import org.eclipse.cdt.ui.testplugin.CTestPlugin;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject; import org.eclipse.cdt.internal.core.model.CProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.cdt.internal.ui.editor.CEditor;
import org.eclipse.core.runtime.IPath; import org.eclipse.cdt.internal.ui.util.EditorUtility;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IContentProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.search.ui.NewSearchUI;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.DrillDownAdapter;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.texteditor.AbstractTextEditor;
import org.eclipse.ui.views.properties.PropertySheet;
/** /**
* This is a simple DOM AST View used for development testing. * This is a simple DOM AST View used for development testing.

View file

@ -13,6 +13,11 @@ package org.eclipse.cdt.ui.tests.DOMAST;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.ASTSignatureUtil; import org.eclipse.cdt.core.dom.ast.ASTSignatureUtil;
import org.eclipse.cdt.core.dom.ast.ASTTypeUtil; import org.eclipse.cdt.core.dom.ast.ASTTypeUtil;
@ -29,7 +34,6 @@ import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression; import org.eclipse.cdt.core.dom.ast.IASTLiteralExpression;
import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTNodeLocation;
import org.eclipse.cdt.core.dom.ast.IASTPointer; import org.eclipse.cdt.core.dom.ast.IASTPointer;
import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement; import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement;
import org.eclipse.cdt.core.dom.ast.IASTPreprocessorObjectStyleMacroDefinition; import org.eclipse.cdt.core.dom.ast.IASTPreprocessorObjectStyleMacroDefinition;
@ -47,11 +51,8 @@ import org.eclipse.cdt.core.dom.ast.c.ICASTPointer;
import org.eclipse.cdt.core.dom.ast.gnu.c.IGCCASTArrayRangeDesignator; import org.eclipse.cdt.core.dom.ast.gnu.c.IGCCASTArrayRangeDesignator;
import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointer; import org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointer;
import org.eclipse.cdt.core.parser.util.ArrayUtil; import org.eclipse.cdt.core.parser.util.ArrayUtil;
import org.eclipse.cdt.internal.core.dom.parser.ASTNode; import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
/** /**
* @author dsteffle * @author dsteffle

View file

@ -1,22 +1,72 @@
#Wed Jul 05 13:45:48 CEST 2006 #Fri Jul 07 17:11:16 CEST 2006
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
org.eclipse.jdt.core.compiler.compliance=1.4 org.eclipse.jdt.core.compiler.compliance=1.4
org.eclipse.jdt.core.compiler.doc.comment.support=enabled org.eclipse.jdt.core.compiler.doc.comment.support=enabled
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.nullReference=ignore
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.4 org.eclipse.jdt.core.compiler.source=1.4
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16

View file

@ -111,13 +111,8 @@ abstract public class AbstractPathOptionBlock extends TabFolderOptionBlock imple
* allowed, but all existing settings will be cleared and replace by the * allowed, but all existing settings will be cleared and replace by the
* given or default paths. * given or default paths.
* *
* @param cproject * @param element
* The C/C++ project to configure. Does not have to exist. * The C/C++ project to configure. Does not have to exist.
* @param outputLocation
* The output location to be set in the page. If <code>null</code>
* is passed, jdt default settings are used, or - if the project is
* an existing Java project- the output location of the existing
* project
* @param cpathEntries * @param cpathEntries
* The path entries to be set in the page. If <code>null</code> is * The path entries to be set in the page. If <code>null</code> is
* passed, jdt default settings are used, or - if the project is an * passed, jdt default settings are used, or - if the project is an

View file

@ -230,9 +230,6 @@ public class CPElement {
return buf.append(';'); return buf.append(';');
} }
/**
* @return
*/
public StringBuffer appendEncodedSettings(StringBuffer buf) { public StringBuffer appendEncodedSettings(StringBuffer buf) {
buf.append(fEntryKind).append(';'); buf.append(fEntryKind).append(';');
appendEncodePath(fPath, buf).append(';'); appendEncodePath(fPath, buf).append(';');

View file

@ -29,10 +29,8 @@ public class CPElementFilter extends ViewerFilter {
protected boolean fShowInherited; protected boolean fShowInherited;
/** /**
* @param excludedFiles * @param excludedElements
* Excluded paths will not pass the filter. <code>null</code> is allowed if no files should be excluded. * Excluded paths will not pass the filter. <code>null</code> is allowed if no files should be excluded.
* @param recusive
* Folders are only shown if, searched recursivly, contain an archive
*/ */
public CPElementFilter(Object[] excludedElements, int[] kind, boolean exportedOnly, boolean showInherited) { public CPElementFilter(Object[] excludedElements, int[] kind, boolean exportedOnly, boolean showInherited) {
if (excludedElements != null) { if (excludedElements != null) {

View file

@ -162,10 +162,6 @@ public class CPElementGroup {
return (CPElement[])children.toArray(new CPElement[children.size()]); return (CPElement[])children.toArray(new CPElement[children.size()]);
} }
/**
* @param newPath
* @return
*/
public boolean contains(CPElement element) { public boolean contains(CPElement element) {
List children = getChildrenList(element.getEntryKind(), false); List children = getChildrenList(element.getEntryKind(), false);
if (children == null) { if (children == null) {

View file

@ -14,13 +14,6 @@ import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.model.IContainerEntry;
import org.eclipse.cdt.core.model.IPathEntry;
import org.eclipse.cdt.internal.ui.util.CoreUtility;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.wizards.ICPathContainerPage;
import org.eclipse.cdt.ui.wizards.IPathEntryContainerPage;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.IExtension;
@ -37,6 +30,14 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Control;
import org.osgi.framework.Bundle; import org.osgi.framework.Bundle;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.model.IContainerEntry;
import org.eclipse.cdt.core.model.IPathEntry;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.wizards.IPathEntryContainerPage;
import org.eclipse.cdt.internal.ui.util.CoreUtility;
public class CPathContainerDescriptor implements IContainerDescriptor { public class CPathContainerDescriptor implements IContainerDescriptor {
@ -45,12 +46,17 @@ public class CPathContainerDescriptor implements IContainerDescriptor {
* @author Dave * @author Dave
* @deprecated * @deprecated
*/ */
public class PathEntryContainerPageAdapter implements IWizardPage, IPathEntryContainerPage { public static class PathEntryContainerPageAdapter implements IWizardPage, IPathEntryContainerPage {
private final ICPathContainerPage fPage; public static IPathEntryContainerPage createAdapter(Object elem) {
/** if (elem instanceof org.eclipse.cdt.ui.wizards.ICPathContainerPage) {
* @param pageName return new PathEntryContainerPageAdapter((org.eclipse.cdt.ui.wizards.ICPathContainerPage) elem);
*/ }
protected PathEntryContainerPageAdapter(ICPathContainerPage page) { return null;
}
private final org.eclipse.cdt.ui.wizards.ICPathContainerPage fPage;
protected PathEntryContainerPageAdapter(org.eclipse.cdt.ui.wizards.ICPathContainerPage page) {
fPage = page; fPage = page;
} }
@ -267,8 +273,10 @@ public class CPathContainerDescriptor implements IContainerDescriptor {
Object elem = CoreUtility.createExtension(fConfigElement, ATT_PAGE_CLASS); Object elem = CoreUtility.createExtension(fConfigElement, ATT_PAGE_CLASS);
if (elem instanceof IPathEntryContainerPage) { if (elem instanceof IPathEntryContainerPage) {
return (IPathEntryContainerPage) elem; return (IPathEntryContainerPage) elem;
} else if (elem instanceof ICPathContainerPage) { }
return new PathEntryContainerPageAdapter((ICPathContainerPage)elem); IPathEntryContainerPage result= PathEntryContainerPageAdapter.createAdapter(elem);
if (result != null) {
return result;
} }
String id = fConfigElement.getAttribute(ATT_ID); String id = fConfigElement.getAttribute(ATT_ID);
throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, 0, throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, 0,
@ -284,7 +292,7 @@ public class CPathContainerDescriptor implements IContainerDescriptor {
String imageName = fConfigElement.getAttribute(ATT_ICON); String imageName = fConfigElement.getAttribute(ATT_ICON);
if (imageName != null) { if (imageName != null) {
IExtension extension = fConfigElement.getDeclaringExtension(); IExtension extension = fConfigElement.getDeclaringExtension();
String plugin = extension.getNamespace(); String plugin = extension.getContributor().getName();
Image image = getImageFromPlugin(plugin, imageName); Image image = getImageFromPlugin(plugin, imageName);
pageImage = image; pageImage = image;
} }

View file

@ -1096,9 +1096,6 @@ public class CPathIncludeSymbolEntryPage extends CPathIncludeSymbolEntryBasePage
public void performDefaults() { public void performDefaults() {
} }
/**
* @return
*/
public List getCPaths() { public List getCPaths() {
List cPaths = new ArrayList(); List cPaths = new ArrayList();
List groups = fIncludeSymPathsList.getElements(); List groups = fIncludeSymPathsList.getElements();

View file

@ -1151,9 +1151,6 @@ public class CPathIncludeSymbolEntryPerFilePage extends CPathIncludeSymbolEntryB
public void performDefaults() { public void performDefaults() {
} }
/**
* @return
*/
public List getCPaths() { public List getCPaths() {
List cPaths = new ArrayList(); List cPaths = new ArrayList();
List groups = fIncludeSymPathsList.getElements(); List groups = fIncludeSymPathsList.getElements();

View file

@ -70,9 +70,6 @@ public class CPathLibraryEntryPage extends CPathBasePage {
private final int IDX_REMOVE = 5; private final int IDX_REMOVE = 5;
private final int IDX_EXPORT = 7; private final int IDX_EXPORT = 7;
/**
* @param title
*/
public CPathLibraryEntryPage(ListDialogField cPathList) { public CPathLibraryEntryPage(ListDialogField cPathList) {
super(CPathEntryMessages.getString("LibrariesEntryPage.title")); //$NON-NLS-1$ super(CPathEntryMessages.getString("LibrariesEntryPage.title")); //$NON-NLS-1$
setDescription(CPathEntryMessages.getString("LibrariesEntryPage.description")); //$NON-NLS-1$ setDescription(CPathEntryMessages.getString("LibrariesEntryPage.description")); //$NON-NLS-1$

View file

@ -67,9 +67,6 @@ public class CPathOutputEntryPage extends CPathBasePage {
private final int IDX_EDIT = 2; private final int IDX_EDIT = 2;
private final int IDX_REMOVE = 3; private final int IDX_REMOVE = 3;
/**
* @param title
*/
public CPathOutputEntryPage(ListDialogField cPathList) { public CPathOutputEntryPage(ListDialogField cPathList) {
super(CPathEntryMessages.getString("OutputPathEntryPage.title")); //$NON-NLS-1$ super(CPathEntryMessages.getString("OutputPathEntryPage.title")); //$NON-NLS-1$
setDescription(CPathEntryMessages.getString("OutputPathEntryPage.description")); //$NON-NLS-1$ setDescription(CPathEntryMessages.getString("OutputPathEntryPage.description")); //$NON-NLS-1$

View file

@ -50,9 +50,6 @@ public class CPathPropertyPage extends PropertyPage implements IStatusChangeList
CPathTabBlock fCPathsBlock; CPathTabBlock fCPathsBlock;
IPathEntryStore fStore; IPathEntryStore fStore;
/**
* @see PropertyPage#createContents
*/
protected Control createContents(Composite parent) { protected Control createContents(Composite parent) {
IProject project = getProject(); IProject project = getProject();
Control result; Control result;

View file

@ -67,9 +67,6 @@ public class CPathSourceEntryPage extends CPathBasePage {
private final int IDX_EDIT = 2; private final int IDX_EDIT = 2;
private final int IDX_REMOVE = 3; private final int IDX_REMOVE = 3;
/**
* @param title
*/
public CPathSourceEntryPage(ListDialogField classPathList) { public CPathSourceEntryPage(ListDialogField classPathList) {
super(CPathEntryMessages.getString("SourcePathEntryPage.title")); //$NON-NLS-1$ super(CPathEntryMessages.getString("SourcePathEntryPage.title")); //$NON-NLS-1$
setDescription(CPathEntryMessages.getString("SourcePathEntryPage.description")); //$NON-NLS-1$ setDescription(CPathEntryMessages.getString("SourcePathEntryPage.description")); //$NON-NLS-1$

View file

@ -186,29 +186,18 @@ public class ExclusionPatternDialog extends StatusDialog {
// -------- ExclusionPatternAdapter -------- // -------- ExclusionPatternAdapter --------
private class ExclusionPatternAdapter implements IListAdapter, IDialogFieldListener { private class ExclusionPatternAdapter implements IListAdapter, IDialogFieldListener {
/**
* @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter#customButtonPressed(org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField, int)
*/
public void customButtonPressed(ListDialogField field, int index) { public void customButtonPressed(ListDialogField field, int index) {
doCustomButtonPressed(field, index); doCustomButtonPressed(field, index);
} }
/**
* @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter#selectionChanged(org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField)
*/
public void selectionChanged(ListDialogField field) { public void selectionChanged(ListDialogField field) {
doSelectionChanged(field); doSelectionChanged(field);
} }
/**
* @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IListAdapter#doubleClicked(org.eclipse.jdt.internal.ui.wizards.dialogfields.ListDialogField)
*/
public void doubleClicked(ListDialogField field) { public void doubleClicked(ListDialogField field) {
doDoubleClicked(field); doDoubleClicked(field);
} }
/**
* @see org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener#dialogFieldChanged(org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField)
*/
public void dialogFieldChanged(DialogField field) { public void dialogFieldChanged(DialogField field) {
} }

View file

@ -12,17 +12,6 @@
package org.eclipse.cdt.internal.ui.dialogs.cpaths; package org.eclipse.cdt.internal.ui.dialogs.cpaths;
import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IContainer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
@ -31,11 +20,20 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer; import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.window.Window; import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.ui.dialogs.NewFolderDialog; import org.eclipse.ui.dialogs.NewFolderDialog;
import org.eclipse.ui.views.navigator.ResourceSorter; import org.eclipse.ui.views.navigator.ResourceSorter;
import org.eclipse.cdt.internal.ui.util.SWTUtil;
/** /**
*/ */
@ -65,9 +63,8 @@ public class FolderSelectionDialog extends ElementTreeSelectionDialog implements
} }
}); });
button.setFont(parent.getFont()); button.setFont(parent.getFont());
GridData data= new GridData(); button.setLayoutData(new GridData());
data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT); SWTUtil.setButtonDimensionHint(button);
button.setLayoutData(data);
fNewFolderButton= button; fNewFolderButton= button;
applyDialogFont(result); applyDialogFont(result);

View file

@ -50,9 +50,6 @@ public class IncludesSymbolsPropertyPage extends PropertyPage implements IStatus
NewIncludesSymbolsTabBlock fIncludesSymbolsBlock; NewIncludesSymbolsTabBlock fIncludesSymbolsBlock;
IPathEntryStore fStore; IPathEntryStore fStore;
/**
* @see PropertyPage#createContents
*/
protected Control createContents(Composite parent) { protected Control createContents(Composite parent) {
IProject project = getProject(); IProject project = getProject();
Control result; Control result;

View file

@ -16,10 +16,8 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IContainer;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTreeViewer; import org.eclipse.jface.viewers.CheckboxTreeViewer;
import org.eclipse.jface.viewers.ICheckStateListener; import org.eclipse.jface.viewers.ICheckStateListener;
@ -45,6 +43,9 @@ import org.eclipse.ui.dialogs.NewFolderDialog;
import org.eclipse.ui.dialogs.SelectionStatusDialog; import org.eclipse.ui.dialogs.SelectionStatusDialog;
import org.eclipse.ui.views.navigator.ResourceSorter; import org.eclipse.ui.views.navigator.ResourceSorter;
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.cdt.internal.ui.util.SWTUtil;
/** /**
*/ */
public class MultipleFolderSelectionDialog extends SelectionStatusDialog implements ISelectionChangedListener { public class MultipleFolderSelectionDialog extends SelectionStatusDialog implements ISelectionChangedListener {
@ -240,10 +241,8 @@ public class MultipleFolderSelectionDialog extends SelectionStatusDialog impleme
} }
}); });
button.setFont(composite.getFont()); button.setFont(composite.getFont());
button.setLayoutData(new GridData());
data = new GridData(); SWTUtil.setButtonDimensionHint(button);
data.heightHint = convertVerticalDLUsToPixels(IDialogConstants.BUTTON_HEIGHT);
button.setLayoutData(data);
fNewFolderButton = button; fNewFolderButton = button;
treeViewer.addSelectionChangedListener(this); treeViewer.addSelectionChangedListener(this);

View file

@ -99,9 +99,6 @@ public class SourceAttachmentBlock {
* listeners for status updates * listeners for status updates
* @param entry * @param entry
* The entry to edit * The entry to edit
* @param containerPath
* Path of the container that contains the given entry or <code>null</code> if the entry does not belong to a
* container.
* @param project * @param project
* Project to which the entry belongs. Can be <code>null</code> if <code>getRunnable</code> is not run and the * Project to which the entry belongs. Can be <code>null</code> if <code>getRunnable</code> is not run and the
* entry does not belong to a container. * entry does not belong to a container.
@ -164,8 +161,6 @@ public class SourceAttachmentBlock {
/** /**
* Null for now * Null for now
*
* @return
*/ */
public IPath getSourceAttachmentPrefixMapping() { public IPath getSourceAttachmentPrefixMapping() {
return null; return null;

View file

@ -46,8 +46,6 @@ public class SourceAttachmentDialog extends StatusDialog {
* <code>getSourceAttachmentRootPath</code>. * <code>getSourceAttachmentRootPath</code>.
* @param parent Parent shell for the dialog * @param parent Parent shell for the dialog
* @param entry The entry to edit * @param entry The entry to edit
* @param containerPath Path of the container that contains the given entry or
* <code>null</code> if the entry does not belong to a container.
* @param project Project to which the entry belongs. Can be * @param project Project to which the entry belongs. Can be
* <code>null</code> if <code>applyChanges</code> is false and the entry * <code>null</code> if <code>applyChanges</code> is false and the entry
* does not belong to a container. * does not belong to a container.

View file

@ -143,8 +143,8 @@ public class TextEditorDropAdapter extends DropTargetAdapter implements
} }
} catch (CoreException exc) { } catch (CoreException exc) {
ExceptionHandler.handle(exc, ExceptionHandler.handle(exc,
CUIMessages.getString("TextEditorDropAdapter.error.title"), CUIMessages.getString("TextEditorDropAdapter.error.title"), //$NON-NLS-1$
CUIMessages.getString("TextEditorDropAdapter.error.message")); CUIMessages.getString("TextEditorDropAdapter.error.message")); //$NON-NLS-1$
} }
} }
@ -354,7 +354,7 @@ public class TextEditorDropAdapter extends DropTargetAdapter implements
if (!file.isFile()) { if (!file.isFile()) {
throw new CoreException(new Status(IStatus.ERROR, CUIPlugin throw new CoreException(new Status(IStatus.ERROR, CUIPlugin
.getPluginId(), 0, CUIMessages.getFormattedString( .getPluginId(), 0, CUIMessages.getFormattedString(
"TextEditorDropAdapter.noFile", fileNames[i]), "TextEditorDropAdapter.noFile", fileNames[i]), //$NON-NLS-1$
null)); null));
} }
if (file.canRead()) { if (file.canRead()) {
@ -365,7 +365,7 @@ public class TextEditorDropAdapter extends DropTargetAdapter implements
} else { } else {
throw new CoreException(new Status(IStatus.ERROR, CUIPlugin throw new CoreException(new Status(IStatus.ERROR, CUIPlugin
.getPluginId(), 0, CUIMessages.getFormattedString( .getPluginId(), 0, CUIMessages.getFormattedString(
"TextEditorDropAdapter.unreadableFile", fileNames[i]), "TextEditorDropAdapter.unreadableFile", fileNames[i]), //$NON-NLS-1$
null)); null));
} }
} }

View file

@ -72,12 +72,7 @@ public class CustomFiltersDialog extends SelectionDialog {
/** /**
* Creates a dialog to customize Java element filters. * Creates a dialog to customize Java element filters.
* *
* @param parentShell the parent shell * @param shell the parent shell
* @param input the root element to populate this dialog with
* @param contentProvider the content provider for navigating the model
* @param labelProvider the label provider for displaying model elements
* @param message the message to be displayed at the top of this dialog, or
* <code>null</code> to display a default message
*/ */
public CustomFiltersDialog( public CustomFiltersDialog(
Shell shell, Shell shell,

View file

@ -119,7 +119,7 @@ public class FilterDescriptor implements Comparable {
} }
}; };
Platform.run(code); SafeRunnable.run(code);
return result[0]; return result[0];
} }
@ -247,7 +247,7 @@ public class FilterDescriptor implements Comparable {
if (FILTER_TAG.equals(element.getName())) { if (FILTER_TAG.equals(element.getName())) {
final FilterDescriptor[] desc= new FilterDescriptor[1]; final FilterDescriptor[] desc= new FilterDescriptor[1];
Platform.run(new SafeRunnable(FilterMessages.getString("FilterDescriptor.filterDescriptionCreationError.message")) { //$NON-NLS-1$ SafeRunnable.run(new SafeRunnable(FilterMessages.getString("FilterDescriptor.filterDescriptionCreationError.message")) { //$NON-NLS-1$
public void run() throws Exception { public void run() throws Exception {
desc[0]= new FilterDescriptor(element); desc[0]= new FilterDescriptor(element);
} }

View file

@ -29,7 +29,6 @@ public class NonCElementFilter extends ViewerFilter {
* Returns the result of this filter, when applied to the * Returns the result of this filter, when applied to the
* given inputs. * given inputs.
* *
* @param inputs the set of elements to
* @return Returns true if element should be included in filtered set * @return Returns true if element should be included in filtered set
*/ */
public boolean select(Viewer viewer, Object parent, Object element) { public boolean select(Viewer viewer, Object parent, Object element) {

View file

@ -94,7 +94,7 @@ public class BuildConsolePreferencePage extends FieldEditorPreferencePage implem
*/ */
private ColorFieldEditor createColorFieldEditor(String preferenceName, String label, Composite parent) { private ColorFieldEditor createColorFieldEditor(String preferenceName, String label, Composite parent) {
ColorFieldEditor editor = new ColorFieldEditor(preferenceName, label, parent); ColorFieldEditor editor = new ColorFieldEditor(preferenceName, label, parent);
editor.setPreferencePage(this); editor.setPage(this);
editor.setPreferenceStore(getPreferenceStore()); editor.setPreferenceStore(getPreferenceStore());
return editor; return editor;
} }

View file

@ -19,11 +19,6 @@ public class CFileTypeAssociation {
private int fType; private int fType;
private IContentType fContentType; private IContentType fContentType;
/**
* @param spec
* @param type
* @param settings
*/
public CFileTypeAssociation(String spec, int type, IContentType contentType) { public CFileTypeAssociation(String spec, int type, IContentType contentType) {
super(); super();
fSpec = spec; fSpec = spec;
@ -54,30 +49,18 @@ public class CFileTypeAssociation {
} }
/**
* @return
*/
public boolean isFileSpec() { public boolean isFileSpec() {
return (fType & IContentType.FILE_NAME_SPEC) != 0; return (fType & IContentType.FILE_NAME_SPEC) != 0;
} }
/**
* @return
*/
public boolean isExtSpec() { public boolean isExtSpec() {
return (fType & IContentType.FILE_EXTENSION_SPEC) != 0; return (fType & IContentType.FILE_EXTENSION_SPEC) != 0;
} }
/**
* @return
*/
public boolean isPredefined() { public boolean isPredefined() {
return (fType & IContentType.IGNORE_USER_DEFINED) != 0; return (fType & IContentType.IGNORE_USER_DEFINED) != 0;
} }
/**
* @return
*/
public boolean isUserDefined() { public boolean isUserDefined() {
return (fType & IContentType.IGNORE_PRE_DEFINED) != 0; return (fType & IContentType.IGNORE_PRE_DEFINED) != 0;
} }

View file

@ -14,18 +14,15 @@ import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.internal.ui.util.PixelConverter;
import org.eclipse.cdt.internal.ui.util.SWTUtil;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope; import org.eclipse.core.resources.ProjectScope;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.content.IContentType; import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.core.runtime.content.IContentTypeManager; import org.eclipse.core.runtime.content.IContentTypeManager;
import org.eclipse.core.runtime.content.IContentTypeSettings; import org.eclipse.core.runtime.content.IContentTypeSettings;
import org.eclipse.core.runtime.preferences.IScopeContext; import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.jface.util.ListenerList;
import org.eclipse.jface.viewers.ColumnWeightData; import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ILabelProviderListener;
@ -51,6 +48,11 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn; import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.internal.ui.util.PixelConverter;
import org.eclipse.cdt.internal.ui.util.SWTUtil;
/* /*
* Preference block that encapsulates the controls used * Preference block that encapsulates the controls used
* for displaying/editing CDT file type associations * for displaying/editing CDT file type associations
@ -243,7 +245,6 @@ public class CFileTypesPreferenceBlock {
gridData = new GridData(GridData.FILL_HORIZONTAL); gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.widthHint = SWTUtil.getButtonWidthHint(fBtnNew); gridData.widthHint = SWTUtil.getButtonWidthHint(fBtnNew);
gridData.heightHint = SWTUtil.getButtonHeigthHint(fBtnNew);
fBtnNew.setLayoutData(gridData); fBtnNew.setLayoutData(gridData);
fBtnNew.addListener(SWT.Selection, new Listener() { fBtnNew.addListener(SWT.Selection, new Listener() {
@ -259,7 +260,6 @@ public class CFileTypesPreferenceBlock {
gridData = new GridData(GridData.FILL_HORIZONTAL); gridData = new GridData(GridData.FILL_HORIZONTAL);
gridData.widthHint = SWTUtil.getButtonWidthHint(fBtnRemove); gridData.widthHint = SWTUtil.getButtonWidthHint(fBtnRemove);
gridData.heightHint = SWTUtil.getButtonHeigthHint(fBtnRemove);
fBtnRemove.setLayoutData(gridData); fBtnRemove.setLayoutData(gridData);
fBtnRemove.addListener(SWT.Selection, new Listener() { fBtnRemove.addListener(SWT.Selection, new Listener() {
@ -309,10 +309,6 @@ public class CFileTypesPreferenceBlock {
fDirty = dirty; fDirty = dirty;
} }
private boolean isDirty() {
return fDirty;
}
public boolean performOk() { public boolean performOk() {
boolean changed = fDirty; boolean changed = fDirty;

View file

@ -96,9 +96,9 @@ public class CFileTypesPropertyPage extends PropertyPage {
private static final String CONTENT_TYPE_PREF_NODE = "content-types"; //$NON-NLS-1$ private static final String CONTENT_TYPE_PREF_NODE = "content-types"; //$NON-NLS-1$
private static final String FULLPATH_CONTENT_TYPE_PREF_NODE = Platform.PI_RUNTIME + IPath.SEPARATOR + CONTENT_TYPE_PREF_NODE; private static final String FULLPATH_CONTENT_TYPE_PREF_NODE = Platform.PI_RUNTIME + IPath.SEPARATOR + CONTENT_TYPE_PREF_NODE;
private static final String PREF_LOCAL_CONTENT_TYPE_SETTINGS = "enabled"; //$NON-NLS-1$ private static final String PREF_LOCAL_CONTENT_TYPE_SETTINGS = "enabled"; //$NON-NLS-1$
private final static String PREF_FILE_EXTENSIONS = "file-extensions"; //$NON-NLS-1$ // private final static String PREF_FILE_EXTENSIONS = "file-extensions"; //$NON-NLS-1$
private final static String PREF_FILE_NAMES = "file-names"; //$NON-NLS-1$ // private final static String PREF_FILE_NAMES = "file-names"; //$NON-NLS-1$
private final static String PREF_SEPARATOR = ","; //$NON-NLS-1$ // private final static String PREF_SEPARATOR = ","; //$NON-NLS-1$
private static final Preferences PROJECT_SCOPE = Platform.getPreferencesService().getRootNode().node(ProjectScope.SCOPE); private static final Preferences PROJECT_SCOPE = Platform.getPreferencesService().getRootNode().node(ProjectScope.SCOPE);
//private static final InstanceScope INSTANCE_SCOPE = new InstanceScope(); //private static final InstanceScope INSTANCE_SCOPE = new InstanceScope();

View file

@ -37,9 +37,6 @@ public class CPluginPreferencePage extends FieldEditorPreferencePage implements
setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore()); setPreferenceStore(CUIPlugin.getDefault().getPreferenceStore());
} }
/**
* @see PreferencePage#createControl(Composite)
*/
public void createControl(Composite parent) { public void createControl(Composite parent) {
super.createControl(parent); super.createControl(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ICHelpContextIds.C_PREF_PAGE); PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ICHelpContextIds.C_PREF_PAGE);

View file

@ -147,7 +147,6 @@ public class PathEntryVariableDialog extends TitleAreaDialog {
* <code>EXISTING_VARIABLE</code> * <code>EXISTING_VARIABLE</code>
* @param variableType the type of variable that can be edited in * @param variableType the type of variable that can be edited in
* this dialog. <code>IResource.FILE</code> or <code>IResource.FOLDER</code> * this dialog. <code>IResource.FILE</code> or <code>IResource.FOLDER</code>
* @param pathEntryVariableManager a reference to the path variable manager
* @param namesInUse a set of variable names currently in use * @param namesInUse a set of variable names currently in use
*/ */
public PathEntryVariableDialog(Shell parentShell, int type, int variableType, Set namesInUse) { public PathEntryVariableDialog(Shell parentShell, int type, int variableType, Set namesInUse) {

View file

@ -12,7 +12,6 @@
package org.eclipse.cdt.internal.ui.preferences; package org.eclipse.cdt.internal.ui.preferences;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
import org.eclipse.jface.preference.PreferencePage; import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
@ -26,6 +25,8 @@ import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage; import org.eclipse.ui.IWorkbenchPreferencePage;
import org.eclipse.ui.PlatformUI; import org.eclipse.ui.PlatformUI;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
public class PathEntryVariablePreferencePage extends PreferencePage public class PathEntryVariablePreferencePage extends PreferencePage
implements IWorkbenchPreferencePage { implements IWorkbenchPreferencePage {
@ -116,7 +117,6 @@ implements IWorkbenchPreferencePage {
* confirmation. * confirmation.
* *
* @see PreferencePage#performOk() * @see PreferencePage#performOk()
* @see PathVariablesGroup#performOk()
*/ */
public boolean performOk() { public boolean performOk() {
return pathEntryVariablesGroup.performOk(); return pathEntryVariablesGroup.performOk();

View file

@ -461,7 +461,7 @@ public class PathEntryVariablesGroup {
* Commits the temporary state to the path variable manager in response to user * Commits the temporary state to the path variable manager in response to user
* confirmation. * confirmation.
* *
* @see IPathVariableManager#setValue(String, IPath) * @see IPathEntryVariableManager#setValue(String, IPath)
*/ */
public boolean performOk() { public boolean performOk() {
try { try {

View file

@ -14,7 +14,9 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridData;
@ -23,23 +25,18 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Table; import org.eclipse.swt.widgets.Table;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.window.Window;
import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.CCorePreferenceConstants; import org.eclipse.cdt.core.CCorePreferenceConstants;
import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.internal.ui.dialogs.IStatusChangeListener;
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo; import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.cdt.internal.ui.util.PixelConverter;
import org.eclipse.cdt.internal.ui.util.SWTUtil; import org.eclipse.cdt.internal.ui.util.SWTUtil;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField; import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.IDialogFieldListener; import org.eclipse.cdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.IListAdapter; import org.eclipse.cdt.internal.ui.wizards.dialogfields.IListAdapter;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.LayoutUtil; import org.eclipse.cdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.ListDialogField; import org.eclipse.cdt.internal.ui.wizards.dialogfields.ListDialogField;
import org.eclipse.cdt.internal.ui.dialogs.IStatusChangeListener;
/** /**
*/ */
@ -99,8 +96,6 @@ public class TodoTaskConfigurationBlock extends OptionsConfigurationBlock {
} }
private PixelConverter fPixelConverter;
private IStatus fTaskTagsStatus; private IStatus fTaskTagsStatus;
private ListDialogField fTodoTasksList; private ListDialogField fTodoTasksList;
@ -168,7 +163,6 @@ public class TodoTaskConfigurationBlock extends OptionsConfigurationBlock {
} }
protected Control createContents(Composite parent) { protected Control createContents(Composite parent) {
fPixelConverter= new PixelConverter(parent);
setShell(parent.getShell()); setShell(parent.getShell());
Composite markersComposite= createMarkersTabContent(parent); Composite markersComposite= createMarkersTabContent(parent);

View file

@ -145,3 +145,4 @@ ActionDefinition.addToIndex.description= Add file to index
PDOMSearch.query.refs.label = Find references to PDOMSearch.query.refs.label = Find references to
PDOMSearch.query.defs.label = Find definitions of PDOMSearch.query.defs.label = Find definitions of
PDOMSearch.query.decls.label = Find declarations of PDOMSearch.query.decls.label = Find declarations of
PDOMSearchPatternQuery.PatternQuery_labelPatternInScope={0} {1} in {2}

View file

@ -29,17 +29,11 @@ public class CSearchUtil {
public static int LRU_WORKINGSET_LIST_SIZE= 3; public static int LRU_WORKINGSET_LIST_SIZE= 3;
private static LRUWorkingSets workingSetsCache; private static LRUWorkingSets workingSetsCache;
/**
*
*/
public CSearchUtil() { public CSearchUtil() {
super(); super();
// TODO Auto-generated constructor stub // TODO Auto-generated constructor stub
} }
/**
* @param sets
*/
public static void updateLRUWorkingSets(IWorkingSet[] workingSets) { public static void updateLRUWorkingSets(IWorkingSet[] workingSets) {
if (workingSets == null || workingSets.length < 1) if (workingSets == null || workingSets.length < 1)
return; return;
@ -54,18 +48,11 @@ public class CSearchUtil {
return CSearchUtil.workingSetsCache; return CSearchUtil.workingSetsCache;
} }
/**
* @param object
* @param shell
*/
public static void warnIfBinaryConstant( ICElement element, Shell shell) { public static void warnIfBinaryConstant( ICElement element, Shell shell) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
} }
/**
* @param workingSets
* @return
*/
public static String toString(IWorkingSet[] workingSets) { public static String toString(IWorkingSet[] workingSets) {
if( workingSets != null & workingSets.length > 0 ){ if( workingSets != null & workingSets.length > 0 ){
String string = new String(); String string = new String();
@ -81,11 +68,6 @@ public class CSearchUtil {
return null; return null;
} }
/**
* @param marker
* @return
*/
public static ICElement getCElement(IMarker marker) { public static ICElement getCElement(IMarker marker) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return null; return null;

View file

@ -54,11 +54,6 @@ public class LRUWorkingSets {
workingSetsCache.add(0, workingSet); workingSetsCache.add(0, workingSet);
} }
/**
* @param workingSetsCache2
* @param workingSet
* @return
*/
private IWorkingSet[] find(ArrayList list, IWorkingSet[] workingSet) { private IWorkingSet[] find(ArrayList list, IWorkingSet[] workingSet) {
Set workingSetList= new HashSet(Arrays.asList(workingSet)); Set workingSetList= new HashSet(Arrays.asList(workingSet));
Iterator iter= list.iterator(); Iterator iter= list.iterator();
@ -85,9 +80,6 @@ public class LRUWorkingSets {
} }
} }
/**
* @return
*/
public Iterator iterator() { public Iterator iterator() {
return workingSetsCache.iterator(); return workingSetsCache.iterator();
} }

View file

@ -60,6 +60,6 @@ public class PDOMSearchElementQuery extends PDOMSearchQuery {
if (element instanceof ICElement) if (element instanceof ICElement)
return super.getLabel() + " " + ((ICElement)element).getElementName(); //$NON-NLS-1$ return super.getLabel() + " " + ((ICElement)element).getElementName(); //$NON-NLS-1$
else else
return super.getLabel() + " something."; return super.getLabel() + " something."; //$NON-NLS-1$
} }
} }

View file

@ -19,6 +19,9 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICProject; import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding; import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;
import org.eclipse.cdt.internal.ui.util.Messages;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.IStatus;
@ -96,7 +99,7 @@ public class PDOMSearchPatternQuery extends PDOMSearchQuery {
} }
public String getLabel() { public String getLabel() {
return super.getLabel() + " " + patternStr + " in " + scopeDesc; return Messages.format(CSearchMessages.getString("PDOMSearchPatternQuery.PatternQuery_labelPatternInScope"), getLabel(), patternStr, scopeDesc); //$NON-NLS-1$
} }
} }

View file

@ -133,7 +133,7 @@ public class PDOMSearchTreeContentProvider implements ITreeContentProvider, IPDO
Display.getDefault().asyncExec(new Runnable() { Display.getDefault().asyncExec(new Runnable() {
public void run() { public void run() {
viewer.refresh(); viewer.refresh();
}; }
}); });
} }
@ -142,7 +142,7 @@ public class PDOMSearchTreeContentProvider implements ITreeContentProvider, IPDO
Display.getDefault().asyncExec(new Runnable() { Display.getDefault().asyncExec(new Runnable() {
public void run() { public void run() {
viewer.refresh(); viewer.refresh();
}; }
}); });
} }

View file

@ -94,9 +94,6 @@ public class DeclarationsSearchGroup extends ActionGroup {
} }
} }
/**
* @return
*/
private FindAction[] getWorkingSetActions() { private FindAction[] getWorkingSetActions() {
ArrayList actions= new ArrayList(CSearchUtil.LRU_WORKINGSET_LIST_SIZE); ArrayList actions= new ArrayList(CSearchUtil.LRU_WORKINGSET_LIST_SIZE);

View file

@ -77,7 +77,7 @@ public class OpenDeclarationsAction extends SelectionParseAction {
} catch (CoreException e) { } catch (CoreException e) {
CUIPlugin.getDefault().log(e); CUIPlugin.getDefault().log(e);
} }
}; }
}); });
} else if (binding instanceof PDOMBinding) { } else if (binding instanceof PDOMBinding) {
PDOMBinding pdomBinding = (PDOMBinding)binding; PDOMBinding pdomBinding = (PDOMBinding)binding;

View file

@ -77,7 +77,7 @@ public class OpenDefinitionAction extends SelectionParseAction {
} catch (CoreException e) { } catch (CoreException e) {
CUIPlugin.getDefault().log(e); CUIPlugin.getDefault().log(e);
} }
}; }
}); });
} }
} }

View file

@ -90,9 +90,6 @@ public class ReferencesSearchGroup extends ActionGroup {
} }
/**
* @return
*/
private FindAction[] getWorkingSetActions() { private FindAction[] getWorkingSetActions() {
ArrayList actions= new ArrayList(CSearchUtil.LRU_WORKINGSET_LIST_SIZE); ArrayList actions= new ArrayList(CSearchUtil.LRU_WORKINGSET_LIST_SIZE);

View file

@ -30,9 +30,6 @@ import org.eclipse.swt.custom.StyleRange;
* the tags or cut them out. * the tags or cut them out.
*/ */
public class HTML2TextReader extends SubstitutionTextReader { public class HTML2TextReader extends SubstitutionTextReader {
private static final String LINE_DELIM= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
private static final Map fgEntityLookup; private static final Map fgEntityLookup;
private static final Set fgTags; private static final Set fgTags;

View file

@ -125,7 +125,7 @@ public abstract class AbstractCEditorTextHover implements ICEditorTextHover,
return CHoverMessages return CHoverMessages
.getFormattedString( .getFormattedString(
"CTextHover.makeStickyHint", keySequence == null ? "" : keySequence); //$NON-NLS-1$ "CTextHover.makeStickyHint", keySequence == null ? "" : keySequence); //$NON-NLS-1$ //$NON-NLS-2$
} }
} }

View file

@ -194,7 +194,7 @@ public class DOMCompletionContributor implements ICompletionContributor {
StringBuffer repStringBuff = new StringBuffer(); StringBuffer repStringBuff = new StringBuffer();
repStringBuff.append(variable.getName()); repStringBuff.append(variable.getName());
String returnTypeStr = "<unknown>"; String returnTypeStr = "<unknown>"; //$NON-NLS-1$
try { try {
IType varType = variable.getType(); IType varType = variable.getType();
if (varType != null) if (varType != null)
@ -204,7 +204,7 @@ public class DOMCompletionContributor implements ICompletionContributor {
StringBuffer dispStringBuff = new StringBuffer(repStringBuff.toString()); StringBuffer dispStringBuff = new StringBuffer(repStringBuff.toString());
if (returnTypeStr != null) { if (returnTypeStr != null) {
dispStringBuff.append(" : "); dispStringBuff.append(" : "); //$NON-NLS-1$
dispStringBuff.append(returnTypeStr); dispStringBuff.append(returnTypeStr);
} }
String dispString = dispStringBuff.toString(); String dispString = dispStringBuff.toString();

View file

@ -97,7 +97,7 @@ public class PDOMCompletionContributor extends DOMCompletionContributor implemen
handleBinding(binding, completionNode, offset, viewer, proposals); handleBinding(binding, completionNode, offset, viewer, proposals);
} }
return false; return false;
}; }
}); });
} }
} }

View file

@ -53,7 +53,7 @@ public class OpenNewWizardAction extends AbstractOpenWizardAction {
try { try {
String iconName = config.getAttribute(ATT_ICON); String iconName = config.getAttribute(ATT_ICON);
if (iconName != null) { if (iconName != null) {
URL pluginInstallUrl = Platform.getBundle(config.getDeclaringExtension().getNamespace()).getEntry("/"); //$NON-NLS-1$ URL pluginInstallUrl = Platform.getBundle(config.getDeclaringExtension().getContributor().getName()).getEntry("/"); //$NON-NLS-1$
return ImageDescriptor.createFromURL(new URL(pluginInstallUrl, iconName)); return ImageDescriptor.createFromURL(new URL(pluginInstallUrl, iconName));
} }
return null; return null;

View file

@ -10,49 +10,29 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.ui.wizards; package org.eclipse.cdt.internal.ui.wizards;
import org.eclipse.cdt.core.model.ICContainer;
import org.eclipse.cdt.core.model.ICModel;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.internal.ui.dialogs.TypedElementSelectionValidator;
import org.eclipse.cdt.internal.ui.dialogs.TypedViewerFilter;
import org.eclipse.cdt.ui.CElementContentProvider;
import org.eclipse.cdt.ui.CElementLabelProvider;
import org.eclipse.cdt.ui.CElementSorter;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.viewers.ViewerSorter; import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; import org.eclipse.ui.dialogs.ElementTreeSelectionDialog;
import org.eclipse.cdt.core.model.ICContainer;
import org.eclipse.cdt.core.model.ICModel;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.ui.CElementContentProvider;
import org.eclipse.cdt.ui.CElementLabelProvider;
import org.eclipse.cdt.ui.CElementSorter;
import org.eclipse.cdt.internal.ui.dialogs.TypedElementSelectionValidator;
import org.eclipse.cdt.internal.ui.dialogs.TypedViewerFilter;
public class SourceFolderSelectionDialog extends ElementTreeSelectionDialog { public class SourceFolderSelectionDialog extends ElementTreeSelectionDialog {
private static final Class[] VALIDATOR_CLASSES = new Class[] { ICContainer.class, ICProject.class }; private static final Class[] VALIDATOR_CLASSES = new Class[] { ICContainer.class, ICProject.class };
private static final TypedElementSelectionValidator fValidator = new TypedElementSelectionValidator(VALIDATOR_CLASSES, false) { private static final TypedElementSelectionValidator fValidator = new TypedElementSelectionValidator(VALIDATOR_CLASSES, false);
public boolean isSelectedValid(Object element) {
if (element instanceof ICProject) {
ICProject cproject = (ICProject) element;
IPath path = cproject.getProject().getFullPath();
return (cproject.findSourceRoot(path) != null);
} else if (element instanceof ICContainer) {
// if (CModelUtil.getSourceFolder((ICContainer)obj) != null)
return true;
}
return false;
}
};
private static final Class[] FILTER_CLASSES = new Class[] { ICModel.class, ICContainer.class, ICProject.class }; private static final Class[] FILTER_CLASSES = new Class[] { ICModel.class, ICContainer.class, ICProject.class };
private static final ViewerFilter fFilter = new TypedViewerFilter(FILTER_CLASSES) { private static final ViewerFilter fFilter = new TypedViewerFilter(FILTER_CLASSES);
public boolean select(Viewer viewer, Object parent, Object element) {
// if (obj instanceof ICContainer
// && CModelUtil.getSourceFolder((ICContainer)obj) != null) {
// return true;
// }
return super.select(viewer, parent, element);
}
};
private static final CElementContentProvider fContentProvider = new CElementContentProvider(); private static final CElementContentProvider fContentProvider = new CElementContentProvider();
private static final ILabelProvider fLabelProvider = new CElementLabelProvider(CElementLabelProvider.SHOW_DEFAULT); private static final ILabelProvider fLabelProvider = new CElementLabelProvider(CElementLabelProvider.SHOW_DEFAULT);

View file

@ -283,7 +283,7 @@ public class NewClassWizardUtil {
* Returns all classes/structs which are accessible from the include * Returns all classes/structs which are accessible from the include
* paths of the given project. * paths of the given project.
* *
* @param project the given project * @param cProject the given project
* @return array of classes/structs * @return array of classes/structs
*/ */
public static ITypeInfo[] getReachableClasses(ICProject cProject) { public static ITypeInfo[] getReachableClasses(ICProject cProject) {

View file

@ -179,10 +179,6 @@ public class SourceFileSelectionDialog extends SelectionStatusDialog {
* *
* @param parent * @param parent
* The parent shell for the dialog * The parent shell for the dialog
* @param labelProvider
* the label provider to render the entries
* @param contentProvider
* the content provider to evaluate the tree structure
*/ */
public SourceFileSelectionDialog(Shell parent) { public SourceFileSelectionDialog(Shell parent) {
super(parent); super(parent);
@ -504,9 +500,6 @@ public class SourceFileSelectionDialog extends SelectionStatusDialog {
/** /**
* Sets the initial selection. Convenience method. * Sets the initial selection. Convenience method.
*
* @param initialPath
* the initial selection.
*/ */
public void setInitialSelection(String folderName, String fileName) { public void setInitialSelection(String folderName, String fileName) {
fInitialFileName = (fileName != null && fileName.length() > 0) ? fileName : null; fInitialFileName = (fileName != null && fileName.length() > 0) ? fileName : null;

View file

@ -45,7 +45,6 @@ import org.eclipse.swt.widgets.Text;
* It handels the Link to file part * It handels the Link to file part
*/ */
public class LinkToFileGroup extends StringButtonDialogField { public class LinkToFileGroup extends StringButtonDialogField {
private String fText;
protected Listener listener; protected Listener listener;
private String initialLinkTarget; private String initialLinkTarget;
private int type; private int type;
@ -134,7 +133,6 @@ public class LinkToFileGroup extends StringButtonDialogField {
} }
public void setText(String text) { public void setText(String text) {
fText= text;
if (isOkToUse(linkTargetField)) { if (isOkToUse(linkTargetField)) {
preventDialogFieldChanged = true; preventDialogFieldChanged = true;
linkTargetField.setText(text); linkTargetField.setText(text);

View file

@ -281,7 +281,7 @@ public class ListDialogField extends DialogField {
/** /**
* Returns the list control. When called the first time, the control will be created. * Returns the list control. When called the first time, the control will be created.
* @param The parent composite when called the first time, or <code>null</code> * @param parent the parent composite when called the first time, or <code>null</code>
* after. * after.
*/ */
public Control getListControl(Composite parent) { public Control getListControl(Composite parent) {
@ -372,7 +372,6 @@ public class ListDialogField extends DialogField {
gd.horizontalAlignment= GridData.FILL; gd.horizontalAlignment= GridData.FILL;
gd.grabExcessHorizontalSpace= true; gd.grabExcessHorizontalSpace= true;
gd.verticalAlignment= GridData.BEGINNING; gd.verticalAlignment= GridData.BEGINNING;
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
gd.widthHint = SWTUtil.getButtonWidthHint(button); gd.widthHint = SWTUtil.getButtonWidthHint(button);
button.setLayoutData(gd); button.setLayoutData(gd);
@ -393,7 +392,7 @@ public class ListDialogField extends DialogField {
/** /**
* Returns the composite containing the buttons. When called the first time, the control * Returns the composite containing the buttons. When called the first time, the control
* will be created. * will be created.
* @param The parent composite when called the first time, or <code>null</code> * @param parent the parent composite when called the first time, or <code>null</code>
* after. * after.
*/ */
public Composite getButtonBox(Composite parent) { public Composite getButtonBox(Composite parent) {

View file

@ -87,7 +87,6 @@ public class SelectionButtonDialogField extends DialogField {
gd.horizontalSpan= nColumns; gd.horizontalSpan= nColumns;
gd.horizontalAlignment= GridData.FILL; gd.horizontalAlignment= GridData.FILL;
if (fButtonStyle == SWT.PUSH) { if (fButtonStyle == SWT.PUSH) {
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
gd.widthHint = SWTUtil.getButtonWidthHint(button); gd.widthHint = SWTUtil.getButtonWidthHint(button);
} }
@ -107,7 +106,7 @@ public class SelectionButtonDialogField extends DialogField {
/** /**
* Returns the selection button widget. When called the first time, the widget will be created. * Returns the selection button widget. When called the first time, the widget will be created.
* @param The parent composite when called the first time, or <code>null</code> * @param group the parent composite when called the first time, or <code>null</code>
* after. * after.
*/ */
public Button getSelectionButton(Composite group) { public Button getSelectionButton(Composite group) {

View file

@ -125,7 +125,7 @@ public class SelectionButtonDialogFieldGroup extends DialogField {
/** /**
* Returns the group widget. When called the first time, the widget will be created. * Returns the group widget. When called the first time, the widget will be created.
* @param The parent composite when called the first time, or <code>null</code> * @param parent the parent composite when called the first time, or <code>null</code>
* after. * after.
*/ */
public Composite getSelectionButtonsGroup(Composite parent) { public Composite getSelectionButtonsGroup(Composite parent) {
@ -197,7 +197,7 @@ public class SelectionButtonDialogFieldGroup extends DialogField {
/** /**
* Returns the selection state of a button contained in the group. * Returns the selection state of a button contained in the group.
* @param The index of the button * @param index the index of the button
*/ */
public boolean isSelected(int index) { public boolean isSelected(int index) {
if (index >= 0 && index < fButtonsSelected.length) { if (index >= 0 && index < fButtonsSelected.length) {

View file

@ -86,7 +86,6 @@ public class StringButtonDialogField extends StringDialogField {
gd.horizontalAlignment= GridData.FILL; gd.horizontalAlignment= GridData.FILL;
gd.grabExcessHorizontalSpace= false; gd.grabExcessHorizontalSpace= false;
gd.horizontalSpan= span; gd.horizontalSpan= span;
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
gd.widthHint = SWTUtil.getButtonWidthHint(button); gd.widthHint = SWTUtil.getButtonWidthHint(button);
return gd; return gd;
} }

View file

@ -154,12 +154,6 @@ public class TreeListDialogField extends DialogField {
fViewerSorter = viewerSorter; fViewerSorter = viewerSorter;
} }
/**
* Sets the viewerSorter.
*
* @param viewerSorter
* The viewerSorter to set
*/
public void setTreeExpansionLevel(int level) { public void setTreeExpansionLevel(int level) {
fTreeExpandLevel = level; fTreeExpandLevel = level;
if (fTree != null) { if (fTree != null) {
@ -255,7 +249,7 @@ public class TreeListDialogField extends DialogField {
* Returns the tree control. When called the first time, the control will be * Returns the tree control. When called the first time, the control will be
* created. * created.
* *
* @param The * @param parent
* parent composite when called the first time, or <code>null</code> * parent composite when called the first time, or <code>null</code>
* after. * after.
*/ */
@ -320,7 +314,6 @@ public class TreeListDialogField extends DialogField {
gd.horizontalAlignment = GridData.FILL; gd.horizontalAlignment = GridData.FILL;
gd.grabExcessHorizontalSpace = true; gd.grabExcessHorizontalSpace = true;
gd.verticalAlignment = GridData.BEGINNING; gd.verticalAlignment = GridData.BEGINNING;
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
gd.widthHint = SWTUtil.getButtonWidthHint(button); gd.widthHint = SWTUtil.getButtonWidthHint(button);
button.setLayoutData(gd); button.setLayoutData(gd);
@ -342,7 +335,7 @@ public class TreeListDialogField extends DialogField {
* Returns the composite containing the buttons. When called the first time, * Returns the composite containing the buttons. When called the first time,
* the control will be created. * the control will be created.
* *
* @param The * @param parent
* parent composite when called the first time, or <code>null</code> * parent composite when called the first time, or <code>null</code>
* after. * after.
*/ */

View file

@ -10,27 +10,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.ui.wizards.filewizard; package org.eclipse.cdt.internal.ui.wizards.filewizard;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ICContainer;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.model.ISourceRoot;
import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.internal.corext.util.CModelUtil;
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.cdt.internal.ui.editor.CEditor;
import org.eclipse.cdt.internal.ui.viewsupport.IViewPartInputProvider;
import org.eclipse.cdt.internal.ui.wizards.NewElementWizardPage;
import org.eclipse.cdt.internal.ui.wizards.SourceFolderSelectionDialog;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.Separator;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.utils.PathUtil;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResource;
@ -59,6 +38,30 @@ import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPart; import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.views.contentoutline.ContentOutline; import org.eclipse.ui.views.contentoutline.ContentOutline;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.ICContainer;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.core.model.ISourceRoot;
import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.utils.PathUtil;
import org.eclipse.cdt.internal.corext.util.CModelUtil;
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.cdt.internal.ui.editor.CEditor;
import org.eclipse.cdt.internal.ui.viewsupport.IViewPartInputProvider;
import org.eclipse.cdt.internal.ui.wizards.NewElementWizardPage;
import org.eclipse.cdt.internal.ui.wizards.SourceFolderSelectionDialog;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.Separator;
import org.eclipse.cdt.internal.ui.wizards.dialogfields.StringButtonDialogField;
public abstract class AbstractFileCreationWizardPage extends NewElementWizardPage { public abstract class AbstractFileCreationWizardPage extends NewElementWizardPage {
private static final int MAX_FIELD_CHARS = 50; private static final int MAX_FIELD_CHARS = 50;
@ -149,7 +152,7 @@ public abstract class AbstractFileCreationWizardPage extends NewElementWizardPag
* Creates the controls for the file name field. Expects a <code>GridLayout</code> with at * Creates the controls for the file name field. Expects a <code>GridLayout</code> with at
* least 3 columns. * least 3 columns.
* *
* @param composite the parent composite * @param parent the parent composite
* @param nColumns number of columns to span * @param nColumns number of columns to span
*/ */
protected abstract void createFileControls(Composite parent, int nColumns); protected abstract void createFileControls(Composite parent, int nColumns);
@ -566,7 +569,6 @@ public abstract class AbstractFileCreationWizardPage extends NewElementWizardPag
* *
* @param monitor a progress monitor to report progress. * @param monitor a progress monitor to report progress.
* @throws CoreException Thrown when the creation failed. * @throws CoreException Thrown when the creation failed.
* @throws InterruptedException Thrown when the operation was cancelled.
*/ */
public abstract void createFile(IProgressMonitor monitor) throws CoreException; public abstract void createFile(IProgressMonitor monitor) throws CoreException;

View file

@ -58,7 +58,7 @@ public class NewHeaderFileCreationWizardPage extends AbstractFileCreationWizardP
* Creates the controls for the file name field. Expects a <code>GridLayout</code> with at * Creates the controls for the file name field. Expects a <code>GridLayout</code> with at
* least 3 columns. * least 3 columns.
* *
* @param composite the parent composite * @param parent the parent composite
* @param nColumns number of columns to span * @param nColumns number of columns to span
*/ */
protected void createFileControls(Composite parent, int nColumns) { protected void createFileControls(Composite parent, int nColumns) {

View file

@ -57,7 +57,7 @@ public class NewSourceFileCreationWizardPage extends AbstractFileCreationWizardP
* Creates the controls for the file name field. Expects a <code>GridLayout</code> with at * Creates the controls for the file name field. Expects a <code>GridLayout</code> with at
* least 3 columns. * least 3 columns.
* *
* @param composite the parent composite * @param parent the parent composite
* @param nColumns number of columns to span * @param nColumns number of columns to span
*/ */
protected void createFileControls(Composite parent, int nColumns) { protected void createFileControls(Composite parent, int nColumns) {

View file

@ -415,7 +415,7 @@ public class NewSourceFolderWizardPage extends NewElementWizardPage {
} }
monitor.beginTask(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.operation"), 3); //$NON-NLS-1$ monitor.beginTask(NewFolderWizardMessages.getString("NewSourceFolderWizardPage.operation"), 3); //$NON-NLS-1$
try { try {
IPath projPath= fCurrCProject.getProject().getFullPath(); // IPath projPath= fCurrCProject.getProject().getFullPath();
String relPath= fRootDialogField.getText(); String relPath= fRootDialogField.getText();
IFolder folder= fCurrCProject.getProject().getFolder(relPath); IFolder folder= fCurrCProject.getProject().getFolder(relPath);

View file

@ -93,6 +93,7 @@ public class CUIPlugin extends AbstractUIPlugin {
public static final String C_PROBLEMMARKER = PLUGIN_CORE_ID + ".problem"; //$NON-NLS-1$ public static final String C_PROBLEMMARKER = PLUGIN_CORE_ID + ".problem"; //$NON-NLS-1$
public static final String ID_INCLUDE_BROWSER= PLUGIN_ID + ".includeBrowser"; //$NON-NLS-1$ public static final String ID_INCLUDE_BROWSER= PLUGIN_ID + ".includeBrowser"; //$NON-NLS-1$
public static final String ID_CALL_HIERARCHY= PLUGIN_ID + ".callHierarchy"; //$NON-NLS-1$
public static final String C_PROJECT_WIZARD_ID = PLUGIN_ID + ".wizards.StdCWizard"; //$NON-NLS-1$ public static final String C_PROJECT_WIZARD_ID = PLUGIN_ID + ".wizards.StdCWizard"; //$NON-NLS-1$
public static final String CPP_PROJECT_WIZARD_ID = PLUGIN_ID + ".wizards.StdCCWizard"; //$NON-NLS-1$ public static final String CPP_PROJECT_WIZARD_ID = PLUGIN_ID + ".wizards.StdCCWizard"; //$NON-NLS-1$
@ -181,16 +182,6 @@ public class CUIPlugin extends AbstractUIPlugin {
/** /**
* The view part id of the type hierarchy part * The view part id of the type hierarchy part
* (value <code>"org.eclipse.cdt.ui.TypeHierarchy"</code>). * (value <code>"org.eclipse.cdt.ui.TypeHierarchy"</code>).
* <p>
* When this id is used to access
* a view part with <code>IWorkbenchPage.findView</code> or
* <code>showView</code>, the returned <code>IViewPart</code>
* can be safely cast to an <code>ITypeHierarchyViewPart</code>.
* </p>
*
* @see ITypeHierarchyViewPart
* @see org.eclipse.ui.IWorkbenchPage#findView(java.lang.String)
* @see org.eclipse.ui.IWorkbenchPage#showView(java.lang.String)
*/ */
public static final String ID_TYPE_HIERARCHY = "org.eclipse.cdt.ui.TypeHierarchyView"; //$NON-NLS-1$ public static final String ID_TYPE_HIERARCHY = "org.eclipse.cdt.ui.TypeHierarchyView"; //$NON-NLS-1$

View file

@ -375,7 +375,6 @@ public class PreferenceConstants {
/** /**
* A named preference that defines whether the hint to make hover sticky should be shown. * A named preference that defines whether the hint to make hover sticky should be shown.
* *
* @see JavaUI
* @since 3.1.1 * @since 3.1.1
*/ */
public static final String EDITOR_SHOW_TEXT_HOVER_AFFORDANCE= "PreferenceConstants.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE"; //$NON-NLS-1$ public static final String EDITOR_SHOW_TEXT_HOVER_AFFORDANCE= "PreferenceConstants.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE"; //$NON-NLS-1$

View file

@ -12,16 +12,11 @@ package org.eclipse.cdt.ui.actions;
import java.util.List; import java.util.List;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
import org.eclipse.cdt.internal.ui.editor.CEditor;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.text.ITextSelection; import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider; import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IActionBars; import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IViewPart; import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbenchSite; import org.eclipse.ui.IWorkbenchSite;
@ -30,6 +25,11 @@ import org.eclipse.ui.actions.ActionGroup;
import org.eclipse.ui.dialogs.PropertyDialogAction; import org.eclipse.ui.dialogs.PropertyDialogAction;
import org.eclipse.ui.part.Page; import org.eclipse.ui.part.Page;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.internal.ui.IContextMenuConstants;
import org.eclipse.cdt.internal.ui.editor.CEditor;
/** /**
* Action group that adds actions to open a new JDT view part or an external * Action group that adds actions to open a new JDT view part or an external
* viewer to a context menu and the global menu bar. * viewer to a context menu and the global menu bar.
@ -171,7 +171,7 @@ public class OpenViewActionGroup extends ActionGroup {
* @see ActionGroup#dispose() * @see ActionGroup#dispose()
*/ */
public void dispose() { public void dispose() {
ISelectionProvider provider= fSite.getSelectionProvider(); // ISelectionProvider provider= fSite.getSelectionProvider();
// provider.removeSelectionChangedListener(fOpenSuperImplementation); // provider.removeSelectionChangedListener(fOpenSuperImplementation);
// provider.removeSelectionChangedListener(fOpenExternalJavadoc); // provider.removeSelectionChangedListener(fOpenExternalJavadoc);
// provider.removeSelectionChangedListener(fOpenTypeHierarchy); // provider.removeSelectionChangedListener(fOpenTypeHierarchy);
@ -187,11 +187,6 @@ public class OpenViewActionGroup extends ActionGroup {
actionBars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), fOpenPropertiesDialog); actionBars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), fOpenPropertiesDialog);
} }
private void appendToGroup(IMenuManager menu, IAction action) {
if (action.isEnabled())
menu.appendToGroup(IContextMenuConstants.GROUP_OPEN, action);
}
private IStructuredSelection getStructuredSelection() { private IStructuredSelection getStructuredSelection() {
ISelection selection= getContext().getSelection(); ISelection selection= getContext().getSelection();
if (selection instanceof IStructuredSelection) if (selection instanceof IStructuredSelection)

View file

@ -59,9 +59,6 @@ public class ShowInCViewAction extends SelectionProviderAction {
//WorkbenchHelp.setHelp(this, ICHelpContextIds.SHOW_IN_CVIEW_ACTION); //WorkbenchHelp.setHelp(this, ICHelpContextIds.SHOW_IN_CVIEW_ACTION);
} }
/**
* @see IAction#actionPerformed
*/
public void run() { public void run() {
ISelection selection = getSelection(); ISelection selection = getSelection();
if (selection instanceof ITextSelection) { if (selection instanceof ITextSelection) {

View file

@ -53,7 +53,6 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
protected HashMap mapParsers = new HashMap(); protected HashMap mapParsers = new HashMap();
private CheckedListDialogField fErrorParserList; private CheckedListDialogField fErrorParserList;
protected boolean listDirty = false; protected boolean listDirty = false;
private boolean usingDeprecatedContructor = false;
class FieldListenerAdapter implements IDialogFieldListener { class FieldListenerAdapter implements IDialogFieldListener {
@ -78,7 +77,7 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
*/ */
public AbstractErrorParserBlock(Preferences prefs) { public AbstractErrorParserBlock(Preferences prefs) {
this(); this();
usingDeprecatedContructor = true; // usingDeprecatedContructor = true;
fPrefs = prefs; fPrefs = prefs;
} }
@ -164,9 +163,6 @@ public abstract class AbstractErrorParserBlock extends AbstractCOptionPage {
/** /**
* To be implemented. abstract method. * To be implemented. abstract method.
*
* @param project
* @param parsers
*/ */
protected abstract void saveErrorParsers(IProject project, String[] parserIDs) throws CoreException; protected abstract void saveErrorParsers(IProject project, String[] parserIDs) throws CoreException;

View file

@ -131,7 +131,7 @@ public class CTagsIndexerBlock extends AbstractIndexerPage {
cTagsExecutable = ControlFactory.createTextField(cTagsExecutableGroup); cTagsExecutable = ControlFactory.createTextField(cTagsExecutableGroup);
((GridData)cTagsExecutable.getLayoutData()).horizontalSpan = 2; ((GridData)cTagsExecutable.getLayoutData()).horizontalSpan = 2;
((GridData)cTagsExecutable.getLayoutData()).grabExcessHorizontalSpace = true;; ((GridData)cTagsExecutable.getLayoutData()).grabExcessHorizontalSpace = true;
browseButtonCTagsExec = ControlFactory.createPushButton(cTagsExecutableGroup,CUIMessages.getString("CTagsIndexerBlock.browseButton")); //$NON-NLS-1$ browseButtonCTagsExec = ControlFactory.createPushButton(cTagsExecutableGroup,CUIMessages.getString("CTagsIndexerBlock.browseButton")); //$NON-NLS-1$
((GridData)browseButtonCTagsExec.getLayoutData()).widthHint = SWTUtil.getButtonWidthHint(browseButtonCTagsExec); ((GridData)browseButtonCTagsExec.getLayoutData()).widthHint = SWTUtil.getButtonWidthHint(browseButtonCTagsExec);
@ -208,7 +208,7 @@ public class CTagsIndexerBlock extends AbstractIndexerPage {
public void loadPersistedValues(ICProject project) throws CoreException { public void loadPersistedValues(ICProject project) throws CoreException {
IPDOMIndexer indexer = CCorePlugin.getPDOMManager().getIndexer(project); IPDOMIndexer indexer = CCorePlugin.getPDOMManager().getIndexer(project);
if (!(indexer instanceof CtagsIndexer)) if (!(indexer instanceof CtagsIndexer))
throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, 0, "Wrong indexer", null)); throw new CoreException(new Status(IStatus.ERROR, CUIPlugin.PLUGIN_ID, 0, "Wrong indexer", null)); //$NON-NLS-1$
ctagsIndexer = (CtagsIndexer)indexer; ctagsIndexer = (CtagsIndexer)indexer;
useDefaultCTags = ctagsIndexer.useCtagsOnPath(); useDefaultCTags = ctagsIndexer.useCtagsOnPath();

View file

@ -15,12 +15,6 @@ import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.CCorePreferenceConstants;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
import org.eclipse.cdt.internal.ui.preferences.PreferencesMessages;
import org.eclipse.cdt.internal.ui.util.PixelConverter;
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension; import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.IExtensionPoint;
@ -37,6 +31,13 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.PlatformUI; import org.eclipse.ui.PlatformUI;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.CCorePreferenceConstants;
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.cdt.internal.ui.ICHelpContextIds;
import org.eclipse.cdt.internal.ui.preferences.PreferencesMessages;
/** /**
* *
*/ */
@ -96,8 +97,6 @@ public class CodeFormatterBlock {
* @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
*/ */
public Control createControl(Composite parent) { public Control createControl(Composite parent) {
PixelConverter converter = new PixelConverter(parent);
Composite control = ControlFactory.createComposite(parent, 2); Composite control = ControlFactory.createComposite(parent, 2);
((GridLayout) control.getLayout()).makeColumnsEqualWidth = false; ((GridLayout) control.getLayout()).makeColumnsEqualWidth = false;
((GridLayout) control.getLayout()).marginWidth = 5; ((GridLayout) control.getLayout()).marginWidth = 5;

View file

@ -11,23 +11,24 @@
package org.eclipse.cdt.ui.dialogs; package org.eclipse.cdt.ui.dialogs;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.ICDescriptor;
import org.eclipse.cdt.core.ICExtensionReference;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.internal.ui.CUIMessages;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.index.AbstractIndexerPage;
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Group;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.ICDescriptor;
import org.eclipse.cdt.core.ICExtensionReference;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.index.AbstractIndexerPage;
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.cdt.internal.ui.CUIMessages;
public class DOMSourceIndexerBlock extends AbstractIndexerPage { public class DOMSourceIndexerBlock extends AbstractIndexerPage {
@ -38,13 +39,7 @@ public class DOMSourceIndexerBlock extends AbstractIndexerPage {
private static final String ENABLE_SYNTACTIC_PROBLEMS = CUIMessages.getString( "IndexerOptions.enableSyntactic" ); //$NON-NLS-1$ private static final String ENABLE_SYNTACTIC_PROBLEMS = CUIMessages.getString( "IndexerOptions.enableSyntactic" ); //$NON-NLS-1$
private static final String INDEXER_PROBLEMS = CUIMessages.getString("IndexerOptions.problemReporting" ); //$NON-NLS-1$ private static final String INDEXER_PROBLEMS = CUIMessages.getString("IndexerOptions.problemReporting" ); //$NON-NLS-1$
private Button preprocessorProblemsEnabled;
private Button syntacticProblemsEnabled;
private Button semanticProblemsEnabled;
private int oldIndexerProblemsValue = 0;
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.ui.dialogs.ICOptionPage#performApply(org.eclipse.core.runtime.IProgressMonitor) * @see org.eclipse.cdt.ui.dialogs.ICOptionPage#performApply(org.eclipse.core.runtime.IProgressMonitor)
*/ */
@ -71,8 +66,8 @@ public class DOMSourceIndexerBlock extends AbstractIndexerPage {
ICExtensionReference[] cext = cdesc.get(CCorePlugin.INDEXER_UNIQ_ID); ICExtensionReference[] cext = cdesc.get(CCorePlugin.INDEXER_UNIQ_ID);
if (cext.length > 0) { if (cext.length > 0) {
for (int i = 0; i < cext.length; i++) { for (int i = 0; i < cext.length; i++) {
String id = cext[i].getID(); // String id = cext[i].getID();
String orig = cext[i].getExtensionData("indexmarkers"); //$NON-NLS-1$ // String orig = cext[i].getExtensionData("indexmarkers"); //$NON-NLS-1$
// String indexProblems = getIndexerProblemsValuesString(); // String indexProblems = getIndexerProblemsValuesString();
// if (orig == null || !orig.equals(indexProblems)) { // if (orig == null || !orig.equals(indexProblems)) {
// cext[i].setExtensionData("indexmarkers", indexProblems); //$NON-NLS-1$ // cext[i].setExtensionData("indexmarkers", indexProblems); //$NON-NLS-1$
@ -111,9 +106,9 @@ public class DOMSourceIndexerBlock extends AbstractIndexerPage {
gd2.horizontalAlignment = GridData.FILL; gd2.horizontalAlignment = GridData.FILL;
preprocessorProblemsEnabled = ControlFactory.createCheckBox( problemsGroup, ENABLE_PREPROCESSOR_PROBLEMS ); ControlFactory.createCheckBox( problemsGroup, ENABLE_PREPROCESSOR_PROBLEMS );
semanticProblemsEnabled = ControlFactory.createCheckBox( problemsGroup, ENABLE_SEMANTIC_PROBLEMS ); ControlFactory.createCheckBox( problemsGroup, ENABLE_SEMANTIC_PROBLEMS );
syntacticProblemsEnabled = ControlFactory.createCheckBox( problemsGroup, ENABLE_SYNTACTIC_PROBLEMS ); ControlFactory.createCheckBox( problemsGroup, ENABLE_SYNTACTIC_PROBLEMS );
setControl(page); setControl(page);
@ -150,12 +145,12 @@ public class DOMSourceIndexerBlock extends AbstractIndexerPage {
ICExtensionReference[] cext = cdesc.get(CCorePlugin.INDEXER_UNIQ_ID); ICExtensionReference[] cext = cdesc.get(CCorePlugin.INDEXER_UNIQ_ID);
if (cext.length > 0) { if (cext.length > 0) {
for (int i = 0; i < cext.length; i++) { for (int i = 0; i < cext.length; i++) {
String id = cext[i].getID(); // String id = cext[i].getID();
String orig = cext[i].getExtensionData("indexmarkers"); //$NON-NLS-1$ String orig = cext[i].getExtensionData("indexmarkers"); //$NON-NLS-1$
if (orig != null){ if (orig != null){
Integer tempInt = new Integer(orig); // Integer tempInt = new Integer(orig);
oldIndexerProblemsValue = tempInt.intValue(); // oldIndexerProblemsValue = tempInt.intValue();
} }
} }
} }
@ -172,7 +167,7 @@ public class DOMSourceIndexerBlock extends AbstractIndexerPage {
public void loadPreferences() { public void loadPreferences() {
String indexerId=prefStore.getString(PREF_INDEX_MARKERS); String indexerId=prefStore.getString(PREF_INDEX_MARKERS);
if (!indexerId.equals("")) { //$NON-NLS-1$ if (!indexerId.equals("")) { //$NON-NLS-1$
oldIndexerProblemsValue = (new Integer(indexerId)).intValue(); // oldIndexerProblemsValue = (new Integer(indexerId)).intValue();
// setIndexerProblemValues(oldIndexerProblemsValue); // setIndexerProblemValues(oldIndexerProblemsValue);
} }
} }

View file

@ -183,12 +183,8 @@ public class IndexerBlock extends AbstractCOptionPage {
return selectedIndexPageId; return selectedIndexPageId;
} }
/**
* @param scComp private boolean createIndexerControls(Composite parent) {
* @param numberOfColumns
* @return
*/
private boolean createIndexerControls(Composite parent) {
Group group= ControlFactory.createGroup(parent,INDEXER_COMBO_LABEL,2); Group group= ControlFactory.createGroup(parent,INDEXER_COMBO_LABEL,2);
// Add discovered indexers combo box // Add discovered indexers combo box
@ -256,8 +252,6 @@ public class IndexerBlock extends AbstractCOptionPage {
/** /**
* Returns the page name for the given id * Returns the page name for the given id
* @param profileId
* @return String
*/ */
protected String getIndexerPageName(String indexerPageId) { protected String getIndexerPageName(String indexerPageId) {
IndexerPageConfiguration configElement = IndexerPageConfiguration configElement =
@ -297,8 +291,6 @@ public class IndexerBlock extends AbstractCOptionPage {
/** /**
* Returns the indexer id for the given name * Returns the indexer id for the given name
* @param profileId
* @return String
*/ */
protected String getIndexerIdName(String indexerPageId) { protected String getIndexerIdName(String indexerPageId) {
IndexerPageConfiguration configElement = IndexerPageConfiguration configElement =
@ -397,18 +389,11 @@ public class IndexerBlock extends AbstractCOptionPage {
} }
} }
/**
* @return
*/
public boolean isIndexEnabled() { public boolean isIndexEnabled() {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return false; return false;
} }
/**
* @param oldIndexerID
* @param project
*/
public void setIndexerID(String indexerID, ICProject project) { public void setIndexerID(String indexerID, ICProject project) {
//Get the corresponding text for the given indexer id //Get the corresponding text for the given indexer id
selectedIndexerId = getIndexerPageName(indexerID); selectedIndexerId = getIndexerPageName(indexerID);

View file

@ -111,7 +111,6 @@ public class MachOBinaryParserPage extends AbstractCOptionPage {
* @see org.eclipse.cdt.ui.dialogs.ICOptionPage#performDefaults() * @see org.eclipse.cdt.ui.dialogs.ICOptionPage#performDefaults()
*/ */
public void performDefaults() { public void performDefaults() {
String addr2line = null;
String cppfilt = null; String cppfilt = null;
IProject proj = getContainer().getProject(); IProject proj = getContainer().getProject();
Preferences store = getContainer().getPreferences(); Preferences store = getContainer().getPreferences();

View file

@ -105,9 +105,6 @@ public abstract class TabFolderOptionBlock {
return composite; return composite;
} }
/**
* @return
*/
protected ICOptionPage getStartPage() { protected ICOptionPage getStartPage() {
return (ICOptionPage)pages.get(0); return (ICOptionPage)pages.get(0);
} }
@ -173,9 +170,6 @@ public abstract class TabFolderOptionBlock {
return true; return true;
} }
/**
* @see DialogPage#setVisible(boolean)
*/
public void setVisible(boolean visible) { public void setVisible(boolean visible) {
if (initializingTabs) if (initializingTabs)
return; return;

View file

@ -56,13 +56,8 @@ public interface ICPathContainerPage extends IWizardPage {
*/ */
public boolean finish(); public boolean finish();
/**
/** * @return the classpath entries created on the page.
* Method {@link #getNewContainers()} is called instead of {@link IClasspathContainerPage#getSelection() }
* to get the the newly added containers. {@link IClasspathContainerPage#getSelection() } is still used
* to get the edited elements.
* @return the classpath entries created on the page. All returned entries must be {@link
* IClasspathEntry#CPE_CONTAINER}
*/ */
public IPathEntry[] getContainerEntries(); public IPathEntry[] getContainerEntries();

View file

@ -66,7 +66,7 @@ public abstract class NewCProjectWizard extends BasicNewResourceWizard implement
private String wz_title; private String wz_title;
private String wz_desc; private String wz_desc;
private String op_error; // private String op_error;
protected IConfigurationElement fConfigElement; protected IConfigurationElement fConfigElement;
protected NewCProjectWizardPage fMainPage; protected NewCProjectWizardPage fMainPage;
@ -89,7 +89,7 @@ public abstract class NewCProjectWizard extends BasicNewResourceWizard implement
setNeedsProgressMonitor(true); setNeedsProgressMonitor(true);
wz_title = title; wz_title = title;
wz_desc = description; wz_desc = description;
op_error = error; // op_error = error;
} }
/* (non-Javadoc) /* (non-Javadoc)

View file

@ -292,7 +292,6 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
Button button= fNamespaceDialogField.getChangeControl(composite); Button button= fNamespaceDialogField.getChangeControl(composite);
gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
gd.widthHint = SWTUtil.getButtonWidthHint(button); gd.widthHint = SWTUtil.getButtonWidthHint(button);
button.setLayoutData(gd); button.setLayoutData(gd);
} }
@ -372,7 +371,6 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
Button button = fHeaderFileDialogField.getChangeControl(composite); Button button = fHeaderFileDialogField.getChangeControl(composite);
gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
gd.widthHint = SWTUtil.getButtonWidthHint(button); gd.widthHint = SWTUtil.getButtonWidthHint(button);
button.setLayoutData(gd); button.setLayoutData(gd);
@ -388,7 +386,6 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
button = fSourceFileDialogField.getChangeControl(composite); button = fSourceFileDialogField.getChangeControl(composite);
gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL); gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gd.heightHint = SWTUtil.getButtonHeigthHint(button);
gd.widthHint = SWTUtil.getButtonWidthHint(button); gd.widthHint = SWTUtil.getButtonWidthHint(button);
button.setLayoutData(gd); button.setLayoutData(gd);
} }
@ -667,7 +664,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
/** /**
* Adds a method stub to the method stubs field. * Adds a method stub to the method stubs field.
* @param methodStub the method stub to add * @param methodStub the method stub to add
* @param checked <code>true</code> if the stub is initially selected (checked) * @param selected <code>true</code> if the stub is initially selected (checked)
*/ */
protected void addMethodStub(IMethodStub methodStub, boolean selected) { protected void addMethodStub(IMethodStub methodStub, boolean selected) {
fMethodStubsDialogField.addMethodStub(methodStub, selected); fMethodStubsDialogField.addMethodStub(methodStub, selected);

View file

@ -27,7 +27,6 @@ import org.eclipse.ui.IWorkbench;
* *
* @author Judy N. Green * @author Judy N. Green
* @since Aug 8, 2002 * @since Aug 8, 2002
* @see CtoCCConversionWizard#addPages
*/ */
public abstract class ConversionWizard public abstract class ConversionWizard
extends NewCProjectWizard { extends NewCProjectWizard {
@ -114,8 +113,6 @@ public abstract class ConversionWizard
/** /**
* Method doRun calls the doRunPrologue and mainPage's doRun method and the * Method doRun calls the doRunPrologue and mainPage's doRun method and the
* doRunEpliogue. Subclasses may overwrite to add further actions * doRunEpliogue. Subclasses may overwrite to add further actions
*
* @see org.eclipse.cdt.ui.wizards.CProjectWizard#doRun(IProgressMonitor)
*/ */
protected void doRun(IProgressMonitor monitor) throws CoreException { protected void doRun(IProgressMonitor monitor) throws CoreException {
try{ try{
@ -144,7 +141,7 @@ public abstract class ConversionWizard
* addPage(mainPage); * addPage(mainPage);
*</pre> *</pre>
* *
* @see Wizard#createPages * @see NewCProjectWizard#addPages
*/ */
public abstract void addPages(); public abstract void addPages();

View file

@ -319,7 +319,6 @@ public abstract class ConvertProjectWizardPage
private static GridData getButtonGridData(Button button) { private static GridData getButtonGridData(Button button) {
GridData data= new GridData(GridData.FILL_HORIZONTAL); GridData data= new GridData(GridData.FILL_HORIZONTAL);
data.widthHint= SWTUtil.getButtonWidthHint(button); data.widthHint= SWTUtil.getButtonWidthHint(button);
data.heightHint= SWTUtil.getButtonHeigthHint(button);
return data; return data;
} }