[Title] update cdt hovering sourct to Indigo SR2
authorTaeyoung Son <taeyoung2.son@samsung.com>
Wed, 21 Nov 2012 07:14:49 +0000 (16:14 +0900)
committerTaeyoung Son <taeyoung2.son@samsung.com>
Wed, 21 Nov 2012 07:21:23 +0000 (16:21 +0900)
[Desc.]
[Issue]

Change-Id: Ibf42552300c087ad78c5dc8e6bdbd88e0af90c96

73 files changed:
org.eclipse.cdt.mylyn.ui/META-INF/MANIFEST.MF
org.eclipse.cdt.mylyn/feature.xml
org.eclipse.cdt.platform/feature.xml
org.eclipse.cdt.ui/.settings/org.eclipse.jdt.core.prefs
org.eclipse.cdt.ui/META-INF/MANIFEST.MF
org.eclipse.cdt.ui/META-INF/maven/org.eclipse.cdt/org.eclipse.cdt.ui/pom.properties
org.eclipse.cdt.ui/META-INF/maven/org.eclipse.cdt/org.eclipse.cdt.ui/pom.xml
org.eclipse.cdt.ui/plugin.properties
org.eclipse.cdt.ui/plugin.xml
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/BaseCElementContentProvider.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CallHierarchyUI.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingManager.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconciler.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBlock.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferencePage.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/NameStyleBlock.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/RefactoringExecutionHelper.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionRefactoring.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractFunctionRefactoringDescription.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/AccessorDescriptor.java [new file with mode: 0644]
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/AccessorFactory.java [new file with mode: 0644]
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/FieldDescriptor.java [new file with mode: 0644]
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/FunctionFactory.java [deleted file]
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/GenerateGettersAndSettersInputPage.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/GenerateGettersAndSettersRefactoring.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/GetterSetterContext.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/GetterSetterInsertEditProvider.java [deleted file]
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/GetterSetterLabelProvider.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/GetterSetterNameGenerator.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Messages.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Messages.properties
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/implementmethod/ImplementMethodRefactoring.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/implementmethod/Messages.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/implementmethod/Messages.properties
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/implementmethod/MethodDefinitionInsertLocationFinder.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/implementmethod/ParameterNamesInputPage.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/ASTManager.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRefactoringArgument.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRefactory.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameGlobalProcessor.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameIncludeProcessor.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameLocalProcessor.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameMacroProcessor.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameProcessor.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameProcessorDelegate.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameRefactoringInputPage.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRenameRefactoringPreferences.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/RenameLinkedMode.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/RenameMessages.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/RenameMessages.properties
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/RenameSupport.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/utils/EclipseObjects.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsJob.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/AbstractCompareViewerInformationControl.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/AbstractSourceViewerInformationControl.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/CReconciler.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/SourceViewerInformationControl.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/InclusionProposalComputer.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/template/TemplateEngine.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/ExcludedFileDecorator.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGenerator.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardUtil.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerBlock.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractLangsListTab.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/refactoring/CTextFileChange.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/CDTMainWizardPage.java
org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage.java

index 835a5c1..ac32b85 100644 (file)
@@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.ui,org.eclipse.core.resources,org.eclipse.
  se.mylyn.monitor.ui;bundle-version="3.0.0",org.eclipse.jface.text,org\r
  .eclipse.ui.editors;bundle-version="3.4.0"\r
 Source-Control-Identifier: \r
-Bundle-Version: 3.7.0.v20120319-0200_patch\r
+Bundle-Version: 3.7.1.v20120425-0100_patch\r
 Export-Package: org.eclipse.mylyn.internal.cdt.ui;x-internal:=true,org\r
  .eclipse.mylyn.internal.cdt.ui.actions;x-internal:=true,org.eclipse.m\r
  ylyn.internal.cdt.ui.contentassist;x-internal:=true,org.eclipse.mylyn\r
index b8432ab..1fbe188 100644 (file)
@@ -12,7 +12,7 @@
 <feature
       id="org.eclipse.cdt.mylyn"
       label="%featureName"
-      version="5.3.0.v20120319-0200_patch"
+      version="5.3.1.v20120425-0100_patch"
       provider-name="%providerName"
       plugin="org.eclipse.mylyn.context.core">
 
@@ -35,9 +35,9 @@
 
    <plugin
          id="org.eclipse.cdt.mylyn.ui"
-         download-size="0"
-         install-size="0"
-         version="3.7.0.v20120319-0200_patch"
+         download-size="62"
+         install-size="132"
+         version="3.7.1.v20120425-0100_patch"
          unpack="false"/>
 
 </feature>
index d081dfe..046473a 100644 (file)
@@ -2,7 +2,7 @@
 <feature
       id="org.eclipse.cdt.platform"
       label="%featureName"
-      version="8.0.0.201109151620_patch"
+      version="8.0.2.201202111925_patch"
       provider-name="%providerName">
 
    <description>
          id="org.eclipse.cdt"
          download-size="71"
          install-size="77"
-         version="8.0.0.201109151620"
+         version="8.0.2.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.core"
-         download-size="4281"
-         install-size="9476"
-         version="5.3.1.201109151620"
+         download-size="4290"
+         install-size="9500"
+         version="5.3.2.201202111925"
          unpack="false"/>
 
    <plugin
@@ -40,7 +40,7 @@
          os="aix"
          download-size="17"
          install-size="45"
-         version="5.1.0.201109151620"
+         version="5.1.1.201202111925"
          fragment="true"
          unpack="false"/>
 
@@ -49,7 +49,7 @@
          os="linux"
          download-size="6"
          install-size="7"
-         version="5.2.0.201109151620"
+         version="5.2.0.201202111925"
          fragment="true"
          unpack="false"/>
 
@@ -79,7 +79,7 @@
          arch="ppc64"
          download-size="15"
          install-size="48"
-         version="5.1.0.201109151620"
+         version="5.1.0.201202111925"
          fragment="true"
          unpack="false"/>
 
@@ -89,7 +89,7 @@
          arch="x86"
          download-size="12"
          install-size="27"
-         version="5.2.0.201109151620"
+         version="5.2.0.201202111925"
          fragment="true"
          unpack="false"/>
 
@@ -99,7 +99,7 @@
          arch="x86_64"
          download-size="13"
          install-size="33"
-         version="5.2.0.201109151620"
+         version="5.2.0.201202111925"
          fragment="true"
          unpack="false"/>
 
          os="macosx"
          download-size="28"
          install-size="88"
-         version="5.2.0.201109151620"
+         version="5.2.0.201202111925"
          fragment="true"
          unpack="false"/>
 
          arch="sparc"
          download-size="17"
          install-size="37"
-         version="5.2.0.201109151620"
+         version="5.2.0.201202111925"
          fragment="true"
          unpack="false"/>
 
          os="win32"
          download-size="6"
          install-size="7"
-         version="5.2.0.201109151620"
+         version="5.2.0.201202111925"
          fragment="true"
          unpack="false"/>
 
          id="org.eclipse.cdt.codan.core"
          download-size="117"
          install-size="231"
-         version="2.0.0.201109151620"
+         version="2.0.0.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.codan.ui"
-         download-size="99"
-         install-size="205"
-         version="2.0.0.201109151620"
+         download-size="100"
+         install-size="206"
+         version="2.0.1.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.codan.core.cxx"
          download-size="36"
          install-size="73"
-         version="1.0.0.201109151620"
+         version="1.0.0.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.codan.ui.cxx"
          download-size="15"
          install-size="28"
-         version="2.0.0.201109151620"
+         version="2.0.0.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.codan.checkers"
          download-size="68"
-         install-size="161"
-         version="1.0.0.201109151620"
+         install-size="162"
+         version="1.0.1.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.codan.checkers.ui"
          download-size="23"
          install-size="44"
-         version="1.0.0.201109151620"
+         version="1.0.0.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.debug.core"
          download-size="475"
          install-size="955"
-         version="7.1.0.201109151620"
+         version="7.1.0.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.debug.ui"
-         download-size="988"
-         install-size="2004"
-         version="7.1.1.201109151620"
+         download-size="989"
+         install-size="2005"
+         version="7.1.2.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.make.core"
          download-size="391"
          install-size="831"
-         version="7.1.1.201109151620"
+         version="7.1.2.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.make.ui"
-         download-size="431"
-         install-size="852"
-         version="7.1.1.201109151620"
+         download-size="427"
+         install-size="846"
+         version="7.1.2.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.managedbuilder.core"
-         download-size="1131"
-         install-size="2692"
-         version="8.0.1.201109151620"
+         download-size="1137"
+         install-size="2707"
+         version="8.0.2.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.managedbuilder.ui"
          download-size="399"
          install-size="827"
-         version="8.0.0.201109151620"
+         version="8.0.2.201202111925"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.cdt.ui"
+         download-size="4982"
+         install-size="10914"
+         version="5.3.2.201202111925_patch"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.doc.user"
-         download-size="13839"
-         install-size="15280"
-         version="5.1.0.201109151620"
+         download-size="14040"
+         install-size="15615"
+         version="5.1.1.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.dsf"
          download-size="276"
          install-size="548"
-         version="2.2.0.201109151620"
+         version="2.2.0.201202111925"
          unpack="false"/>
 
    <plugin
          id="org.eclipse.cdt.dsf.ui"
-         download-size="1197"
-         install-size="2649"
-         version="2.2.0.201109151620"
+         download-size="1198"
+         install-size="2651"
+         version="2.2.1.201202111925"
          unpack="false"/>
 
    <plugin
          arch="x86"
          download-size="76"
          install-size="193"
-         version="5.2.0.201109151620"
+         version="5.2.0.201202111925"
          fragment="true"/>
 
    <plugin
          arch="x86_64"
          download-size="156"
          install-size="329"
-         version="5.2.0.201109151620"
+         version="5.2.0.201202111925"
          fragment="true"/>
 
-   <plugin
-         id="org.eclipse.cdt.ui"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
 </feature>
index 96179a4..af0f20f 100644 (file)
@@ -1,4 +1,3 @@
-#Tue Oct 25 20:04:11 KST 2011
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
index daa4c1a..8d16ee5 100644 (file)
@@ -21,7 +21,7 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.3.0,4.0.0)",org.
  ng;bundle-version="3.4.0",org.eclipse.ltk.ui.refactoring;bundle-versi\r
  on="3.4.0",org.eclipse.ui.navigator.resources;bundle-version="3.3.100\r
  "\r
-Bundle-Version: 5.3.1.201109151620_patch\r
+Bundle-Version: 5.3.2.201202111925_patch\r
 Export-Package: org.eclipse.cdt.internal.corext;x-internal:=true,org.e\r
  clipse.cdt.internal.corext.codemanipulation;x-internal:=true,org.ecli\r
  pse.cdt.internal.corext.fix;x-internal:=true,org.eclipse.cdt.internal\r
@@ -185,7 +185,7 @@ SHA1-Digest: 3WTcHXPQbv/gPiQWTssbIgEp/pM=
 \r
 Name: org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGene\r
  rator$CodeGeneratorException.class\r
-SHA1-Digest: zBVnJmQOnyOcIV5WnhMXznv5XDs=\r
+SHA1-Digest: O7W38xUpyCzyzAZ0CeLvUL/JfAg=\r
 \r
 Name: org/eclipse/cdt/internal/ui/language/FileLanguageMappingProperty\r
  Page$2.class\r
@@ -333,7 +333,7 @@ SHA1-Digest: btsHciB8IcMcBLWjteizRraOBV0=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractF\r
  unctionRefactoringDescription.class\r
-SHA1-Digest: kjHhrORI6OtM3YGfXNqCewWjWwo=\r
+SHA1-Digest: 9M6NAjk966LxKQZAU61reJ31e4Y=\r
 \r
 Name: org/eclipse/cdt/ui/internal/templateengine/wizard/TemplateCNewWi\r
  zard.class\r
@@ -448,7 +448,7 @@ SHA1-Digest: KDXEkxrj3cdRhNP0UO9f3ztxPQc=
 \r
 Name: org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage$SourceFold\r
  erFieldAdapter.class\r
-SHA1-Digest: pzE8RJpV7+VwlFeDAIx+SP3VPM8=\r
+SHA1-Digest: 1moFIYaGulg7GUrPoF+gvrQSCvI=\r
 \r
 Name: org/eclipse/cdt/internal/corext/util/SimplePositionTracker.class\r
 SHA1-Digest: Bn7bnIdFfT+JPvikeviqby/JGOg=\r
@@ -496,7 +496,7 @@ SHA1-Digest: cjSF44uHORpwVJ4Qe4mAXGuGjtE=
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/SourceViewerInformation\r
  Control$1.class\r
-SHA1-Digest: 432Adb5s7LTtcwXzjDwpQZtiYuc=\r
+SHA1-Digest: PNVB2i6aLSculwLjD2HbWPU6XGs=\r
 \r
 Name: org/eclipse/cdt/internal/ui/wizards/settingswizards/ProjectSetti\r
  ngsWizardPage$4.class\r
@@ -573,11 +573,11 @@ SHA1-Digest: QAlC3FbGltdHvXC91O0iiRkoRgg=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Getter\r
  SetterContext.class\r
-SHA1-Digest: D07W0UXSEtYwYxfUcIlxrvF/c8E=\r
+SHA1-Digest: Lpn4dTOO9p1TqielTz4w/M1SIl4=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper\r
  .class\r
-SHA1-Digest: rKtaFJmiSJ1R464h0x4XWX/8/Yw=\r
+SHA1-Digest: P0QaH9jhmYXpOaV7rnfiEgJ79Ek=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/RefactoringStarter.class\r
 SHA1-Digest: 0zw9w8QInuhjlnXUsc4tvpb+D8I=\r
@@ -588,7 +588,7 @@ SHA1-Digest: vn0WgeBQ4ESixMhGk5a8CP0SqTI=
 \r
 Name: org/eclipse/cdt/internal/ui/text/AbstractCompareViewerInformatio\r
  nControl.class\r
-SHA1-Digest: S3IQim32Qdq0PUg+dncb0BXi8OQ=\r
+SHA1-Digest: U7dk9dqqSfbz/ouaq9Jg0kzTjmo=\r
 \r
 Name: org/eclipse/cdt/internal/ui/viewsupport/CElementLabelComposer.cl\r
  ass\r
@@ -623,7 +623,7 @@ SHA1-Digest: 3KKw9DJjgqRirWeZwMyEV2xEND0=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/RefactoringExecutionHelp\r
  er.class\r
-SHA1-Digest: 2cxIMjBmi89ErDrCBufhaQ3+M1E=\r
+SHA1-Digest: 5rejtWJ2m3E5YtGShKGd22zTA/8=\r
 \r
 Name: org/eclipse/cdt/ui/newui/NewConfigurationDialog$1.class\r
 SHA1-Digest: MUAXExWfyA2VDAHNswhx6ty+U2U=\r
@@ -695,10 +695,6 @@ SHA1-Digest: KMfMEM2NLdzgGRX+VIQI1rlSh9A=
 Name: icons/obj16/include_obj.gif\r
 SHA1-Digest: torGTf0k3nn12ONa1poxzVWfTCg=\r
 \r
-Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Getter\r
- SetterContext$FieldWrapper.class\r
-SHA1-Digest: JxEU0AfOTiSrU+hK8zytywlmWBs=\r
-\r
 Name: org/eclipse/cdt/internal/ui/util/RemoteTreeViewer.class\r
 SHA1-Digest: jS/9fyrFVaiggnXdWJRiLLjnSrk=\r
 \r
@@ -818,7 +814,7 @@ SHA1-Digest: BtPCJ32VFOG67pq+GnpZcwtwV5I=
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorat\r
  ionControl.class\r
-SHA1-Digest: F1KOPsT2SN48iKc8R8zAFSy2fUQ=\r
+SHA1-Digest: WhUm2BSyqFoz7/SWus+UX+hBo34=\r
 \r
 Name: org/eclipse/cdt/internal/ui/language/LanguageMappingWidget$1.cla\r
  ss\r
@@ -919,7 +915,7 @@ Name: org/eclipse/cdt/ui/refactoring/actions/HideMethodAction.class
 SHA1-Digest: u4Ugc19Y1+2+w73h7wVDRkm4Yko=\r
 \r
 Name: org/eclipse/cdt/ui/dialogs/IndexerBlock$1.class\r
-SHA1-Digest: jXkhBYWUKJ8D4EvfeCZhRF4KW90=\r
+SHA1-Digest: DhQJug2ybyl7oB3uxsDSuB9xpXI=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CEditorHoverConfiguratio\r
  nBlock$HoverConfig.class\r
@@ -953,7 +949,7 @@ SHA1-Digest: mbkNhywTwIFXMbZUoR9MxSxXWHU=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBloc\r
  k$1.class\r
-SHA1-Digest: UCJ+NqpoPrI5U19vedFVT5wwzls=\r
+SHA1-Digest: F+lFoKrj5q4Dz0CgkwK6R66mxJg=\r
 \r
 Name: org/eclipse/cdt/internal/ui/search/IPDOMSearchContentProvider.cl\r
  ass\r
@@ -962,6 +958,10 @@ SHA1-Digest: LNWvdvMwmCLWDLcytmEjGK+F/gg=
 Name: org/eclipse/cdt/ui/newui/CLocationTab$_Filter.class\r
 SHA1-Digest: bNeDxLMqHKJtaHwgkdZ++xm1S+w=\r
 \r
+Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Access\r
+ orDescriptor$AccessorKind.class\r
+SHA1-Digest: 11RTd/3aeHW7/9wlWarxR25U4XI=\r
+\r
 Name: org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationM\r
  anager$2.class\r
 SHA1-Digest: Pb4FwywXU0F4Ik0Kz4Rw8WNXGQo=\r
@@ -976,14 +976,14 @@ SHA1-Digest: beSFt/D5sgzVq85FL5aevRsbKhc=
 \r
 Name: org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsJob$1\r
  .class\r
-SHA1-Digest: vHG6LEG5drER22fWVKj37SFI0cE=\r
+SHA1-Digest: 6R1IBkLa7BIEygrYDyeOjw3XcK4=\r
 \r
 Name: org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathFilterPage.class\r
 SHA1-Digest: QgnjqSGmq+1p0wGJ+43J8glucmY=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/SemanticHighlightingManager$H\r
  ighlightedPosition.class\r
-SHA1-Digest: KuTz8FXHNrpQNTbyzGcAHPHG7ig=\r
+SHA1-Digest: g+0ftrkp9pQpIbxYOpmBb6l+iEo=\r
 \r
 Name: org/eclipse/cdt/internal/ui/viewsupport/DecoratingCLabelProvider\r
  .class\r
@@ -1057,7 +1057,7 @@ Name: org/eclipse/cdt/internal/ui/filters/NonCProjectsFilter.class
 SHA1-Digest: vjxe5aPhp/nwQHYNks54CEhRcsI=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover$2.class\r
-SHA1-Digest: TSUKZSMw/tP3ljqnvvX3SWVgjrg=\r
+SHA1-Digest: DX0MJLJ5ApWcGtVNCPfbvbcxmiU=\r
 \r
 Name: org/eclipse/cdt/internal/ui/workingsets/WorkingSetMessages.prope\r
  rties\r
@@ -1269,7 +1269,7 @@ SHA1-Digest: PEM82DolGy6DjvteM2523Vnp29w=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRefactoringArgum\r
  ent.class\r
-SHA1-Digest: sdtv1e0KyDXhc/XgR6dVvx8Gw9E=\r
+SHA1-Digest: S3Sh3xRpsGvgjdwz2tSm+ndGWMA=\r
 \r
 Name: org/eclipse/cdt/internal/ui/viewsupport/ColoringLabelProvider.cl\r
  ass\r
@@ -1277,7 +1277,7 @@ SHA1-Digest: bYXgoXVIXAy98icB5IgthsOFfvo=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Genera\r
  teGettersAndSettersInputPage$3.class\r
-SHA1-Digest: /+21woPFdD7mITSbde9j3i7QAmo=\r
+SHA1-Digest: g6up/lmfKVVzIikCJKqK+XcD+lk=\r
 \r
 Name: icons/dtool16/build_configs.gif\r
 SHA1-Digest: FgSfgP7vEGZZ/a2a6BN1roPzq1g=\r
@@ -1341,7 +1341,7 @@ SHA1-Digest: ZJ020wo+/gPm4GF3XMpFL4RWehs=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Genera\r
  teGettersAndSettersRefactoring$1.class\r
-SHA1-Digest: 9PV1C0bjvEHpT3sUvu8Nr1kAIDw=\r
+SHA1-Digest: /52Ppx6bC5PEkuYkPwzBt5OYsmE=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/MarkOccurrencesPreferenc\r
  ePage.class\r
@@ -1412,7 +1412,7 @@ Name: org/eclipse/cdt/internal/ui/DocumentInputStream.class
 SHA1-Digest: Eino/qQ7tqM3UPawv1eqqQIRJDo=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$6.class\r
-SHA1-Digest: CAoKursEshvd/XIz3N4Wvwk49fc=\r
+SHA1-Digest: ZGew8ZhAld1ll9Km70P6Wd8m+10=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/ProjectSelectionDialog$3\r
  .class\r
@@ -1423,7 +1423,7 @@ SHA1-Digest: rb8EI8bCeu3MQ9OK7eh1slLjz7A=
 \r
 Name: org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.cla\r
  ss\r
-SHA1-Digest: G/tT+0XXxhPJX9E5PQNKEwi8ix0=\r
+SHA1-Digest: NYfpVZN6w1dLFhvMshZQwuYJYvM=\r
 \r
 Name: org/eclipse/cdt/ui/dialogs/TabFolderOptionBlock.class\r
 SHA1-Digest: q2x8SWrtpGIK4+IABznD0bZbxBE=\r
@@ -1486,7 +1486,7 @@ Name: org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathOrderExportPage.
 SHA1-Digest: ofSzMdrJmSP/ya/4NCPL7jXRgFg=\r
 \r
 Name: org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage$1.class\r
-SHA1-Digest: P2qn5jFprQpfu/j/6BdXpajlsIQ=\r
+SHA1-Digest: frAPXKP711olWX3nijFddJXkwyQ=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/AbstractAnnotationHover\r
  $AnnotationInformationControl$3.class\r
@@ -1525,7 +1525,7 @@ SHA1-Digest: lOJhtoOwMiYaCSczEL4kgMgzZu4=
 \r
 Name: org/eclipse/cdt/internal/ui/callhierarchy/CallHierarchyUI$2.clas\r
  s\r
-SHA1-Digest: HlPrYYB712lL2/56uHD1ngeM6Fc=\r
+SHA1-Digest: gSU6qU7VR8wtcP630C2nlKOVJLw=\r
 \r
 Name: org/eclipse/cdt/ui/text/CSourceViewerConfiguration$5.class\r
 SHA1-Digest: QkUpBN8tYMqCX7wdh7dQTjZQ+38=\r
@@ -1584,11 +1584,11 @@ SHA1-Digest: 8FTvViLiC91HAHjPf0VCgKizWTA=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage$2.\r
  class\r
-SHA1-Digest: ozV1eO2lWpZSr8Y+Rglz1jCgVP0=\r
+SHA1-Digest: SWeULwQlxad1Fn9ezAJDDMd4bYw=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/implementmethod/Messages\r
  .properties\r
-SHA1-Digest: yaCkORxEIXW2gNEsu03DvQawLwg=\r
+SHA1-Digest: dZS0iIlosY2Iyqiu+FoN67ida84=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/Visibility.class\r
 SHA1-Digest: MzGXYujaylIsG4syNtcdFgiXpEU=\r
@@ -1698,7 +1698,7 @@ SHA1-Digest: WRTNmTACUTg1hCg+nVJdINCdidY=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Messag\r
  es.properties\r
-SHA1-Digest: aZ59/Z9nYitF9cfxjof0RfWiz84=\r
+SHA1-Digest: P7vAtQrOecrcRKQmUEZpew6gUMM=\r
 \r
 Name: org/eclipse/cdt/internal/corext/template/c/TemplateMessages.prop\r
  erties\r
@@ -1738,7 +1738,7 @@ SHA1-Digest: q/VX0JUyCx3+61CA3XPubedbhXA=
 \r
 Name: org/eclipse/cdt/internal/ui/editor/SemanticHighlightingPresenter\r
  $1.class\r
-SHA1-Digest: ZRzDVMuSfNZCHoQ1fhtR06av1fk=\r
+SHA1-Digest: fbfcjdRzDAEE2d/LAgyC1NZG99w=\r
 \r
 Name: icons/elcl16/newmngcc_app.gif\r
 SHA1-Digest: 9fMfZW/0oFAkEsLdLitr6hquteI=\r
@@ -1748,7 +1748,7 @@ Name: org/eclipse/cdt/internal/ui/preferences/IndexerPreferencePage.cl
 SHA1-Digest: ab4JupqI3+MgQYNfh28KZccDcSs=\r
 \r
 Name: org/eclipse/cdt/internal/ui/callhierarchy/CallHierarchyUI.class\r
-SHA1-Digest: ccKk2FkBmWamiKNlGo42f4bLdUM=\r
+SHA1-Digest: yaNaEFu/Rm6UNzUpsfIXXnrb3RQ=\r
 \r
 Name: org/eclipse/cdt/internal/ui/dnd/DelegatingDropAdapter$1.class\r
 SHA1-Digest: 8Tjztvn3WUdIs2fr5YfTx4o3yvE=\r
@@ -1859,6 +1859,10 @@ Name: org/eclipse/cdt/internal/ui/editor/asm/AsmPreprocessorScanner.cl
  ass\r
 SHA1-Digest: oJAfnjOPpL6n93TOi8zIu6Cnh7M=\r
 \r
+Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/FieldD\r
+ escriptor.class\r
+SHA1-Digest: +kutlyxdZUgOzbgZjuKrH6igxec=\r
+\r
 Name: org/eclipse/cdt/internal/ui/preferences/formatter/ModifyDialogTa\r
  bPage$1.class\r
 SHA1-Digest: /ymcUH9cbq2euPQErphRJPq05mc=\r
@@ -1947,7 +1951,7 @@ SHA1-Digest: o824SOSh52Oa3FFmH5fSorGlV3k=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameGlobalProc\r
  essor.class\r
-SHA1-Digest: 6BLA9lFA4ZAE+q4f82tnWjsBoD4=\r
+SHA1-Digest: vsvt7662O5W6jfg2mnZx0euIvbc=\r
 \r
 Name: org/eclipse/cdt/internal/ui/dialogs/SelectionList$1.class\r
 SHA1-Digest: FjeKJyVSNpsOCZUQGIfZ2wIdkCQ=\r
@@ -2083,7 +2087,7 @@ SHA1-Digest: DHZeEIaxm+epAEKLTIz/JF5ooFI=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/ASTManager$2.clas\r
  s\r
-SHA1-Digest: 6FYOFe36IVTspVV+SvK8AW/M+gg=\r
+SHA1-Digest: yEt6vdfwYWPWdtLZxceXpOLmA9Y=\r
 \r
 Name: org/eclipse/cdt/internal/ui/filters/CustomFiltersDialog.class\r
 SHA1-Digest: exOS/u+K2v4aQZuB5BohIz9uQFg=\r
@@ -2147,7 +2151,7 @@ SHA1-Digest: X5ljuw2vIR3JgemIzWUcBdMvEhU=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBloc\r
  k$AssocContentProvider.class\r
-SHA1-Digest: NGD5UPaW6S9l2nPVNcZde/Q87ps=\r
+SHA1-Digest: ldeOB4RHzfDd+nmOihFPtOpenXE=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CSourcePreviewerUpdater$\r
  1.class\r
@@ -2219,7 +2223,7 @@ Name: org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelect
 SHA1-Digest: +HaebNqpWD4y5/Rl7ZG73LpN24A=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor.class\r
-SHA1-Digest: JG9u7P2p+6j8pGmOgfir+QTvkAE=\r
+SHA1-Digest: EYzL6xeHEbakv+a7+qwpMBmiO+A=\r
 \r
 Name: org/eclipse/cdt/ui/newui/ManageConfigDialog$5.class\r
 SHA1-Digest: e/oE8FitiDvi5XnMaFBCq2+NC+s=\r
@@ -2259,7 +2263,7 @@ SHA1-Digest: l6gDSeW38Jk9gqN869iOxaZ9TEw=
 \r
 Name: org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage$NamespaceF\r
  ieldAdapter.class\r
-SHA1-Digest: Byau49jKJMzKtgp648+aXjIAz3I=\r
+SHA1-Digest: /H0mC0gH9m7CfkGInL0WfDhV/V8=\r
 \r
 Name: org/eclipse/cdt/internal/ui/cview/MainActionGroup.class\r
 SHA1-Digest: BsHwSwb37q0IeL6EuHXizeTyTu8=\r
@@ -2623,7 +2627,7 @@ Name: org/eclipse/cdt/ui/dialogs/PreferenceScopeBlock$1.class
 SHA1-Digest: o4+ksqJhg4X6BM5y5OcyrHrm3oo=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover$1.class\r
-SHA1-Digest: 8Ssi2VWF27jS7LoSyZxMatmoypg=\r
+SHA1-Digest: YRGg3h7C4SlKmUFCUKXHi5TK3jE=\r
 \r
 Name: org/eclipse/cdt/internal/ui/wizards/settingswizards/ProjectSetti\r
  ngsImportStrategy$ImporterSectionPair.class\r
@@ -2642,7 +2646,7 @@ SHA1-Digest: qYxT8z58Q7EZaOcTQoAb+9M6y50=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/RefactoringExecutionHelp\r
  er$Operation$1.class\r
-SHA1-Digest: 8O9EeZZm47PSgmoVExUmrkfpb1Y=\r
+SHA1-Digest: eSd347J2tLS4BzvziYHshV/+AAM=\r
 \r
 Name: org/eclipse/cdt/internal/ui/wizards/settingswizards/ProjectSetti\r
  ngsWizard.class\r
@@ -2851,7 +2855,7 @@ SHA1-Digest: SbtYKAV/9quAD6wLD42bOFPxLzo=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Genera\r
  teGettersAndSettersInputPage$2.class\r
-SHA1-Digest: rhiwEWK/Wulp9/58QXcDCI7K+OE=\r
+SHA1-Digest: fRGtA4f3EId8XI9/tU/8VO/5CAE=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/formatter/CreateProfileD\r
  ialog$1.class\r
@@ -2882,7 +2886,7 @@ SHA1-Digest: tDjA3vAQRBw/ms7Put0OI0aH4rU=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameMacroProce\r
  ssor.class\r
-SHA1-Digest: QDKH8sW2RhMVy7iKe8g3ccRo/lc=\r
+SHA1-Digest: vUQ3DjGN2YSP/H6HtL4QUZWOQYg=\r
 \r
 Name: org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingPrope\r
  rtyPage.class\r
@@ -2905,7 +2909,7 @@ SHA1-Digest: BgvHTC2sgPOmMW6WtkYV2oCOXGc=
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/SourceViewerInformation\r
  Control.class\r
-SHA1-Digest: Pm7M4q5J0ScYz1jeO9O8u2clrkA=\r
+SHA1-Digest: NbzXANAmC9RN/QRKnm/eGYK5zpM=\r
 \r
 Name: org/eclipse/cdt/ui/browser/typeinfo/TypeInfoLabelProvider.class\r
 SHA1-Digest: GHheppiN8k2IMPnFuAVYbgTv2p0=\r
@@ -2928,7 +2932,7 @@ SHA1-Digest: CZyKwJ/5jA0R6PcpT/OjmRI8Bao=
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorat\r
  ionControl$5.class\r
-SHA1-Digest: epu8SUgh/BWX6HiPvDctUfjqkdE=\r
+SHA1-Digest: EeGCgU+pVQbL26FaRLXbVHMWo00=\r
 \r
 Name: icons/wizban/fieldrefact_wiz.gif\r
 SHA1-Digest: SuLUhIeqKr8fwti3WNh7rl2FhEs=\r
@@ -2962,7 +2966,7 @@ Name: org/eclipse/cdt/internal/ui/refactoring/togglefunction/ToggleFro
 SHA1-Digest: kJKAh1VzdvABaa12sr9EM06Ch9o=\r
 \r
 Name: META-INF/maven/org.eclipse.cdt/org.eclipse.cdt.ui/pom.properties\r
-SHA1-Digest: RMNknza+A3xtxwOyALiUt7lWYIo=\r
+SHA1-Digest: 5fe6O15QbSDXwHnyFmLIllBFggI=\r
 \r
 Name: org/eclipse/cdt/internal/ui/callhierarchy/OpenCallHierarchyActio\r
  n.class\r
@@ -2983,7 +2987,7 @@ SHA1-Digest: 7Z/LDsapb3BN3Nfk2pHEYpn0Mpk=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/implementmethod/Messages\r
  .class\r
-SHA1-Digest: i1kCXsn7RO1Tn9JG8VHONj4xTj8=\r
+SHA1-Digest: 2WvPeUyweGCjVUXdN9DowldX67I=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/BestMatchHover.class\r
 SHA1-Digest: 6DwPuHN976dughPX2dw+f36y264=\r
@@ -2999,7 +3003,7 @@ Name: org/eclipse/cdt/internal/ui/wizards/NewElementWizard$2.class
 SHA1-Digest: owsuCu4HmhGzU6WZhBfBf1x1WPA=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$5.class\r
-SHA1-Digest: Mpf760cc0pzk0bvZA8oPJp1t8a0=\r
+SHA1-Digest: TeAJitPoAwcftA4zNdPLrZdS+vA=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/ProjectSelectionDialog$2\r
  .class\r
@@ -3038,7 +3042,7 @@ SHA1-Digest: 9qa6V0vyHIt6do1VPOHT8ehn5Rc=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/RenameMessages.cl\r
  ass\r
-SHA1-Digest: mN2PV0XuXQxAyFHSVhpsATdE6AA=\r
+SHA1-Digest: sN5ACiG9xZDO7xRVLvIfDLbCdLw=\r
 \r
 Name: org/eclipse/cdt/ui/newui/StructureTreeTab$4.class\r
 SHA1-Digest: yTdwa2ab9QuXlY3oxGwLUMWRM+Q=\r
@@ -3056,7 +3060,7 @@ SHA1-Digest: WQoE8ngtiDkeuMf2ZTK2wF7imO8=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/RenameLinkedMode.\r
  class\r
-SHA1-Digest: PKA8fW+9GVDlBre4FOyEGghDxcc=\r
+SHA1-Digest: xZpVfNJqfiqXRvYLOvdQj884EMw=\r
 \r
 Name: icons/dlcl16/hierarchy_co.gif\r
 SHA1-Digest: IrCD/kydEUV1cUePbnXGPtN17Js=\r
@@ -3080,7 +3084,7 @@ SHA1-Digest: dP+CXhbHfYxAWTP850++/ypPABg=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferencePage\r
  .class\r
-SHA1-Digest: OFIuw3Gqr5+DOI1XYcNF9Sla4H8=\r
+SHA1-Digest: FXiUelNBb8e1HGjQB/FWGb2Mw/c=\r
 \r
 Name: org/eclipse/cdt/internal/ui/wizards/dialogfields/TreeListDialogF\r
  ield$1.class\r
@@ -3122,7 +3126,7 @@ SHA1-Digest: Es5PSYWlM145Qmf0xI6UeKtLjrw=
 \r
 Name: org/eclipse/cdt/internal/ui/callhierarchy/CallHierarchyUI$1.clas\r
  s\r
-SHA1-Digest: 0SLE1wwiJehTYXDSN4+vFCqk29s=\r
+SHA1-Digest: KTYJgTG3Xtt9kVZhvKCcYmxR5iE=\r
 \r
 Name: icons/ovr16/external_file.gif\r
 SHA1-Digest: xjWtz/BjpfB8oT+2FZ+NZ5GuxvQ=\r
@@ -3190,7 +3194,7 @@ SHA1-Digest: zM1y2LyUgyY/ULIp9VgNYSHYqEc=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage$1.\r
  class\r
-SHA1-Digest: p37iy8uNVPUHXhBRtKG8Wn3Ev6Y=\r
+SHA1-Digest: tS6/Kmzmjume58MRnJagdOkYuVs=\r
 \r
 Name: org/eclipse/cdt/internal/ui/util/RemoteTreeContentManager$2.clas\r
  s\r
@@ -3220,10 +3224,6 @@ Name: org/eclipse/cdt/internal/ui/actions/SurroundWithTemplateMenuActi
  on$2.class\r
 SHA1-Digest: rctGupErmLSGbUaLNePEiYjLNxc=\r
 \r
-Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRefactory$1.clas\r
- s\r
-SHA1-Digest: X96STwNelTqLvXXk2tSZmRnYCWg=\r
-\r
 Name: icons/obj16/method_private_obj.gif\r
 SHA1-Digest: NSQB1QuQCOwYBOnFVuXgg9NuZ7c=\r
 \r
@@ -3401,7 +3401,7 @@ SHA1-Digest: 6umwvskrUacAatWCaKti/jz1z3A=
 \r
 Name: org/eclipse/cdt/internal/ui/text/AbstractSourceViewerInformation\r
  Control$1.class\r
-SHA1-Digest: mS75X1PrSpzQEmBFmEpclX6bZEU=\r
+SHA1-Digest: fkpScsQwRd8VwWkkO0p2OUg40bw=\r
 \r
 Name: org/eclipse/cdt/utils/ui/controls/ControlFactory.class\r
 SHA1-Digest: APcyF8GVLxqkaBPZGzsb53R+d7I=\r
@@ -3490,7 +3490,7 @@ SHA1-Digest: UXTZYUwe8M/0BOeB/rmqyRZap14=
 \r
 Name: org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage$MethodStub\r
  sFieldAdapter.class\r
-SHA1-Digest: +lxZitjti+S32vI7XNuk5vH0PN0=\r
+SHA1-Digest: gEnJ0Lff9TZB25vV3qwXlE9MV+U=\r
 \r
 Name: icons/wizban/prj_obj.gif\r
 SHA1-Digest: wYKoCZPOld/s6u/All9KfNDD4PY=\r
@@ -3663,6 +3663,10 @@ SHA1-Digest: 3JlbIvuxLD0BQlksspDnt/bNWkI=
 Name: org/eclipse/cdt/utils/ui/controls/ControlFactory$1.class\r
 SHA1-Digest: S5omdq7sw8mvSYVxtpLWB9FiG9Q=\r
 \r
+Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Access\r
+ orDescriptor.class\r
+SHA1-Digest: 2gHhpkNY86nt1ETn/RuyuIDZBKs=\r
+\r
 Name: org/eclipse/cdt/internal/ui/preferences/OverlayPreferenceStore$O\r
  verlayKey.class\r
 SHA1-Digest: h5vl8HRj06mTScJDLHpSNBFSBTU=\r
@@ -3708,7 +3712,7 @@ SHA1-Digest: d9rWrNuSsw/XYFE7fcEX1XSyLhA=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/ASTManager$1.clas\r
  s\r
-SHA1-Digest: HJU4wbBqnNWI64KcVHikGZ+KD68=\r
+SHA1-Digest: YPfnKMDXFnNDZix9u9H/H1Nvrtk=\r
 \r
 Name: org/eclipse/cdt/internal/ui/actions/FoldingMessages.class\r
 SHA1-Digest: or2Tj24FK8C+G7KpQVR0nNZjYqM=\r
@@ -3726,7 +3730,7 @@ SHA1-Digest: TwulW79gkrCg6xrwyIpPmc/UA6k=
 \r
 Name: org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage$BaseClasse\r
  sFieldAdapter.class\r
-SHA1-Digest: 9GukINU3Dc3o7nLdvsVN4y9/JPE=\r
+SHA1-Digest: H1iqTyvCU/3OJQYNoRTmH0csAS4=\r
 \r
 Name: org/eclipse/cdt/internal/ui/dialogs/StatusDialog.class\r
 SHA1-Digest: NEejHnGSa6EZW/+qv5VzvYyfjEg=\r
@@ -3904,10 +3908,10 @@ SHA1-Digest: VUtdpwmS3vl8WQg+KLBP9gVZxQ0=
 \r
 Name: org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage$ClassNameF\r
  ieldAdapter.class\r
-SHA1-Digest: hu6MsO19NdTeFMwMY9YoiOVm0YM=\r
+SHA1-Digest: 9HOLd+BKCi7GhXRlaCkc34ZypMA=\r
 \r
 Name: org/eclipse/cdt/ui/dialogs/IndexerBlock.class\r
-SHA1-Digest: 9ATOVUAvyOikyZ22anHXM1cxCdk=\r
+SHA1-Digest: uYT7x5H/Kofjk9DPK/QSZkglbag=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/folding/FoldingMessages.propert\r
  ies\r
@@ -4019,7 +4023,7 @@ SHA1-Digest: XGesc5KPkxZ/RkdW1J1IeIZ2t7c=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/implementmethod/Implemen\r
  tMethodRefactoring.class\r
-SHA1-Digest: yaHwN/nHxtEqMBveachDpd7pHOQ=\r
+SHA1-Digest: EGdvlXQuCppBGeiqigkyvKZ0nBk=\r
 \r
 Name: org/eclipse/cdt/utils/ui/controls/FileListControl$SelectPathInpu\r
  tDialog$2.class\r
@@ -4088,7 +4092,7 @@ Name: icons/elcl16/collapseall.gif
 SHA1-Digest: X2SYkCGSP2jr+iOlYBLU19jEd4Y=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/CReconciler.class\r
-SHA1-Digest: DAA021MCs6jt62ZEScRzrfP33wg=\r
+SHA1-Digest: MlvVCpoA851ovku7VykfWlK6EJI=\r
 \r
 Name: org/eclipse/cdt/internal/ui/viewsupport/SelectionProviderMediato\r
  r$2.class\r
@@ -4286,7 +4290,7 @@ Name: org/eclipse/cdt/internal/ui/refactoring/rename/RenameInformation
 SHA1-Digest: tgqyc/8IrFbwxkbm36oufkYoAVI=\r
 \r
 Name: org/eclipse/cdt/ui/dialogs/IndexerBlock$IndexerConfig.class\r
-SHA1-Digest: KoZMCddspVvbeUY3BLn0S83jmhI=\r
+SHA1-Digest: PutzL/UdW3dDvAKATmkQKwMd9m0=\r
 \r
 Name: org/eclipse/cdt/ui/templateengine/uitree/uiwidgets/UISelectWidge\r
  t.class\r
@@ -4313,9 +4317,9 @@ SHA1-Digest: CT7EoYcqs7qrKceeSnPWNdXqhis=
 Name: org/eclipse/cdt/ui/dialogs/IInputStatusValidator.class\r
 SHA1-Digest: S3/FNWyUJ/jlYW/GuvlcncNqals=\r
 \r
-Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Getter\r
SetterInsertEditProvider.class\r
-SHA1-Digest: l46OBAbOpNG/hv4IzhGQU9so1XI=\r
+Name: org/eclipse/cdt/internal/ui/refactoring/rename/RenameSupport$1.c\r
+ lass\r
+SHA1-Digest: hvUajJz1pWdB8q8vi7hg7UR4+1Q=\r
 \r
 Name: org/eclipse/cdt/internal/ui/dialogs/cpaths/MultipleFolderSelecti\r
  onDialog$4.class\r
@@ -4325,10 +4329,6 @@ Name: org/eclipse/cdt/ui/text/contentassist/ContentAssistInvocationCon
  text.class\r
 SHA1-Digest: 2UBImTjxKTq0JNAVIDvEyXk9p14=\r
 \r
-Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Functi\r
- onFactory.class\r
-SHA1-Digest: qJNxds9cSL5HuLfif0/jHfubx5w=\r
-\r
 Name: org/eclipse/cdt/internal/ui/workingsets/WorkingSetMessages.class\r
 SHA1-Digest: NhwtO+er9CP9FbKB6KFHGt8rcik=\r
 \r
@@ -4398,7 +4398,7 @@ SHA1-Digest: AjTl5NX39SjPIx/fHdISZ7iVmeU=
 \r
 Name: org/eclipse/cdt/internal/ui/callhierarchy/CallHierarchyUI$2$1.cl\r
  ass\r
-SHA1-Digest: 3OmtwwyFjeQ/WzvChGa19zCtWVA=\r
+SHA1-Digest: ky5hY9tbmA6g/3Cun+Apb9f0FIM=\r
 \r
 Name: org/eclipse/cdt/internal/ui/cview/CView$2.class\r
 SHA1-Digest: OoRPsH33+hciiZjyKZk0d/Oe9Pw=\r
@@ -4451,7 +4451,7 @@ SHA1-Digest: Omxtxr+5f8vfrusx9j50uJQcPno=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/RefactoringExecutionHelp\r
  er$Operation.class\r
-SHA1-Digest: YGvChnLsulpAWhOb0nzSdJxGBEE=\r
+SHA1-Digest: NHBouMd8DRnGMIXXZoeIm/HSjjs=\r
 \r
 Name: org/eclipse/cdt/internal/ui/viewsupport/CElementLabelComposer$Fl\r
  exibleBuffer.class\r
@@ -4491,7 +4491,7 @@ SHA1-Digest: nOTaT2uJshjH1ReL8zhIWiFFZ1g=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Genera\r
  teGettersAndSettersInputPage$1.class\r
-SHA1-Digest: 5P3YSM1G5vCkieRAskCHJnc9NLM=\r
+SHA1-Digest: LlhPImC08MxWxlXW7PeAE5depJQ=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/formatter/AlreadyExistsD\r
  ialog.class\r
@@ -4502,7 +4502,7 @@ SHA1-Digest: bimTIED/9q4XOIDIZPcR4qufpqc=
 \r
 Name: org/eclipse/cdt/internal/ui/text/AbstractCompareViewerInformatio\r
  nControl$CompareViewerControl.class\r
-SHA1-Digest: VnAB3ayTRWCOL31jZMKVo8m5wUA=\r
+SHA1-Digest: Wgo0VCtRtjTfZgFRRz8ShAlNxD0=\r
 \r
 Name: icons/obj16/toolbar_pinned.gif\r
 SHA1-Digest: IycEvMkgySuB2wK17MCWcu6Vt88=\r
@@ -4534,7 +4534,7 @@ SHA1-Digest: FYla7OdfyPK/oW0q7T0dcxPRctc=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameRefactorin\r
  gPreferences.class\r
-SHA1-Digest: pU26ln8xEMRW/cLJW7kT0pkPnlk=\r
+SHA1-Digest: fHu9Uc+FXyDtvZ/Pgtyq5+iFACE=\r
 \r
 Name: icons/etool16/newfile_wiz.gif\r
 SHA1-Digest: QcxM0kkl1Mo/T76FdX6dg4s4tA0=\r
@@ -4545,7 +4545,7 @@ SHA1-Digest: 0mm9hwJ9m2HNenbkrI7D3H0jTj0=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/RenameLinkedMode$\r
  3.class\r
-SHA1-Digest: 6PB2iZk6+mf74Upsb/MTpwKhCVM=\r
+SHA1-Digest: 4pVYTuTywJkheJT0wQM2px/ImUM=\r
 \r
 Name: icons/dtool16/newc_app.gif\r
 SHA1-Digest: Suig672IzG6jSNPFGBZmoGs4D4Q=\r
@@ -4555,7 +4555,7 @@ Name: org/eclipse/cdt/internal/ui/dialogs/cpaths/SourceAttachmentBlock
 SHA1-Digest: IcLZGMKHVRNxEvGrR3aBzg9CI6g=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/ASTManager.class\r
-SHA1-Digest: tRi5a0KGUXfBwyLAdu9bvyNfCtI=\r
+SHA1-Digest: pK0pxkiSssRl6CEK3rZvY2qFNxc=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/IndexNameToAstNameMatche\r
  r.class\r
@@ -4563,7 +4563,7 @@ SHA1-Digest: GmzamPfdm6kRu0L3u+jisgRMBUA=
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorat\r
  ionControl$4.class\r
-SHA1-Digest: XNR29uQ1YBLxXJvvRal5z9yWEYk=\r
+SHA1-Digest: jTRJXLQCWj/8KNX2PyOO04OU/EQ=\r
 \r
 Name: icons/obj16/filesyst.gif\r
 SHA1-Digest: Aauf0IWttKpubN35BhGFmXo2Ekk=\r
@@ -4591,10 +4591,6 @@ SHA1-Digest: pE+ll1VYoU98rrkjni+v15OmqoE=
 Name: org/eclipse/cdt/internal/ui/util/OpenExternalProblemAction.class\r
 SHA1-Digest: H/35CLjwaFMpwIgmPArdDYcsFuQ=\r
 \r
-Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Getter\r
- SetterContext$FunctionWrapper.class\r
-SHA1-Digest: mEjRBnIj68EleHCWuGFFjIVj86I=\r
-\r
 Name: icons/dtool16/config-release.gif\r
 SHA1-Digest: e58qnmFQHJpW1CpLMtMaqxVjBpg=\r
 \r
@@ -4651,7 +4647,7 @@ Name: org/eclipse/cdt/internal/ui/preferences/formatter/LineWrappingTa
 SHA1-Digest: RM4icFOppCiAB32wrpq6z80mKsQ=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$4.class\r
-SHA1-Digest: 3wDPAn2mTJeRGgrkJUBHcbqxATs=\r
+SHA1-Digest: AH5umU0WpQZ9WhM+5FYh4r+XJ6U=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/ProjectSelectionDialog$1\r
  .class\r
@@ -4669,7 +4665,7 @@ SHA1-Digest: /B8UeXgkz5luGD92borvg6kdMZg=
 \r
 Name: org/eclipse/cdt/internal/ui/text/AbstractSourceViewerInformation\r
  Control.class\r
-SHA1-Digest: DcCunpc4UOBCE+Tqj8tv0OiNQrA=\r
+SHA1-Digest: JjZtFMeQraL10S3LcdZCm5PUAtI=\r
 \r
 Name: org/eclipse/cdt/internal/ui/language/ProjectContentTypeMappingDi\r
  alog$2.class\r
@@ -4761,7 +4757,7 @@ SHA1-Digest: 0TF5ddABKjppA3JT3i3imGqIXkQ=
 \r
 Name: org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconcile\r
  r$PositionCollector.class\r
-SHA1-Digest: hzDhVDMxsnK9JLPyamBZMjWXCjo=\r
+SHA1-Digest: RgEksMnZ3ap3iRR8tFrYWWwONbk=\r
 \r
 Name: org/eclipse/cdt/internal/ui/dnd/CDTViewerDragAdapter.class\r
 SHA1-Digest: LPSuCHO7eEiQAeuVeRyws31Cr0c=\r
@@ -4965,7 +4961,7 @@ SHA1-Digest: ookX9kCV50FddwgCRIw5m4w52zA=
 \r
 Name: org/eclipse/cdt/internal/ui/text/CReconciler$ElementChangedListe\r
  ner.class\r
-SHA1-Digest: HKH4Dl/dwUNQVvAgqZfbJPS2T1o=\r
+SHA1-Digest: KXSibBigONAQtHRTno0GxrOk1S8=\r
 \r
 Name: icons/obj16/correction_add.gif\r
 SHA1-Digest: 48lJqtGPTLceuO5hgsIb8/qafsw=\r
@@ -5042,7 +5038,7 @@ SHA1-Digest: Qo6lAo4080FYT6P+Aorl18E7zsk=
 \r
 Name: org/eclipse/cdt/internal/ui/editor/SemanticHighlightingManager.c\r
  lass\r
-SHA1-Digest: CQ6XiWFZCftBNA3ir/cEFVNxZaQ=\r
+SHA1-Digest: 7md1zfKYXzC9eDJs93+mPBLWugE=\r
 \r
 Name: org/eclipse/cdt/ui/wizards/CCProjectWizard.class\r
 SHA1-Digest: qqeeoGiPX++PWW4cGqEkwW3OnMk=\r
@@ -5061,7 +5057,7 @@ SHA1-Digest: 3J/RKKMfO16U+A0FYnN9BhPDbc8=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameProcessor.\r
  class\r
-SHA1-Digest: LIFe7bnTOoAS/AoItV8WCjRS7/Q=\r
+SHA1-Digest: saz783bk2X1nPeoBxmur6RlPzUk=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionHover$1.\r
  class\r
@@ -5249,7 +5245,7 @@ SHA1-Digest: /P61DMhrF6udhnA1374Q577dX/M=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/implementmethod/Implemen\r
  tMethodRefactoring$1.class\r
-SHA1-Digest: T1OFI1goDawrsBzlbY7xBWQ57lQ=\r
+SHA1-Digest: CCYMWG/yk7+ezRRl8UKnVh3Jq7Y=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage$3\r
  .class\r
@@ -5263,7 +5259,7 @@ Name: org/eclipse/cdt/internal/ui/dialogs/cpaths/NewSourceFolderDialog
 SHA1-Digest: p+mx6hOR7BabAq959Nkl7sJOZsE=\r
 \r
 Name: plugin.properties\r
-SHA1-Digest: Wc0VZnQAPZoLbGsN7E3f+bJQ8Yo=\r
+SHA1-Digest: W2/uhx1iWv5hFddIg/t3EVeX0II=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionInput$1.\r
  class\r
@@ -5293,7 +5289,7 @@ SHA1-Digest: ZRi7f4dV25jp1V44xkE/cGHR7Ho=
 \r
 Name: org/eclipse/cdt/internal/ui/viewsupport/ExcludedFileDecorator.cl\r
  ass\r
-SHA1-Digest: kt+GyTANAOjZADbkcQv82GbZgVs=\r
+SHA1-Digest: Iu50zT708IOGQVJ8R+ZijMhHwsw=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/CBreakIterator$LineDelimiter.cl\r
  ass\r
@@ -5418,7 +5414,7 @@ SHA1-Digest: 02pJoWmix9+Qy6+CFQh/hZiOdiQ=
 \r
 Name: org/eclipse/cdt/internal/ui/text/contentassist/InclusionProposal\r
  Computer$1.class\r
-SHA1-Digest: q8GP7p4c9EMHlIJbNOMK3X5t58c=\r
+SHA1-Digest: QItf1OheWn9V6MXLmuG7/4VlhlQ=\r
 \r
 Name: org/eclipse/cdt/internal/ui/language/WorkspaceContentTypeMapping\r
  Dialog$1.class\r
@@ -5443,7 +5439,7 @@ Name: org/eclipse/cdt/internal/ui/wizards/folderwizard/NewFolderWizard
 SHA1-Digest: 4//Ovcp5kCp8hm/UDlRQzlvCSdw=\r
 \r
 Name: org/eclipse/cdt/ui/newui/AbstractLangsListTab$8.class\r
-SHA1-Digest: 2XQXAVP8oh8kmpzpTlhkevtt7RI=\r
+SHA1-Digest: kHIgv3xShGd4Hpv8cj4fIh756Cw=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/template/TemplateVariableProces\r
  sor.class\r
@@ -5456,6 +5452,10 @@ Name: org/eclipse/cdt/ui/text/doctools/generic/GenericTagDoubleClickSt
  rategy.class\r
 SHA1-Digest: c+q2ZJB3300/rpiFPY58mk7geq4=\r
 \r
+Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Access\r
+ orFactory$SetterFactory.class\r
+SHA1-Digest: k2V7/UtWAi6O/NNO2CSmHO/DDSo=\r
+\r
 Name: org/eclipse/cdt/internal/ui/text/COutlineInformationControl.clas\r
  s\r
 SHA1-Digest: c+u+bw8YqwrB2GRcvvC8E0FZgw8=\r
@@ -5465,7 +5465,7 @@ SHA1-Digest: hEVZ48wkzGUG/OYvz4qX9HwznHk=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Messag\r
  es.class\r
-SHA1-Digest: 4zRijHO23gggy5xBOI5zyy4JmZs=\r
+SHA1-Digest: 71CP7dYlVSQSSuwg/uwlos6TsPc=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/correction/proposals/LinkedName\r
  sAssistProposal$2.class\r
@@ -5543,7 +5543,7 @@ Name: org/eclipse/cdt/ui/newui/ErrorParsTab$2.class
 SHA1-Digest: dj8x7og9cm8TfYpIYdufsoOU1xU=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/NameStyleBlock.class\r
-SHA1-Digest: dZE8zKA6wUEmqrwe4/2Gb8DaYN0=\r
+SHA1-Digest: +HXl24HT+N3ZGpfAeYiOhy4IcZM=\r
 \r
 Name: org/eclipse/cdt/internal/ui/language/FileLanguageMappingProperty\r
  Page$LanguageTableData.class\r
@@ -5750,7 +5750,7 @@ SHA1-Digest: FgSfgP7vEGZZ/a2a6BN1roPzq1g=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Genera\r
  teGettersAndSettersInputPage$7.class\r
-SHA1-Digest: Zz9oE7zMSnRwk1jB7cFVTGXOgJM=\r
+SHA1-Digest: fL+xD4pkJj4HwzCIc5KgxRzISzU=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractF\r
  unctionInformation.class\r
@@ -5796,7 +5796,7 @@ SHA1-Digest: d3EXZQz0SiyHnQYWKW7qsqDsOXc=
 \r
 Name: org/eclipse/cdt/internal/ui/editor/SemanticHighlightingPresenter\r
  .class\r
-SHA1-Digest: abZc47NwBNkayqQmhoBsSwtT93Q=\r
+SHA1-Digest: L6IZnk181sTpBk56vJqWeLgmUk0=\r
 \r
 Name: icons/dtool16/action-editconfig.gif\r
 SHA1-Digest: dj4LtYYqWOTaI+VQES8fHEI6cFI=\r
@@ -5844,7 +5844,7 @@ SHA1-Digest: wX0jtcl97Y+e0TeA4AQn5YiBWOw=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Getter\r
  SetterLabelProvider.class\r
-SHA1-Digest: S2JelYex8+DFBcuIX8gjg00D3UA=\r
+SHA1-Digest: y4hly1O0U27r8wXOaTG9gpdvxQo=\r
 \r
 Name: org/eclipse/cdt/internal/ui/typehierarchy/THViewPart$22.class\r
 SHA1-Digest: cIjCsMSyn2eTwRsKeNqrT+xlQZY=\r
@@ -5933,7 +5933,7 @@ SHA1-Digest: AmXsHfZ+iw3hoW9QCYQQul2WZbY=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Genera\r
  teGettersAndSettersRefactoring.class\r
-SHA1-Digest: SFnZmuyWtueF5k5i+WgkPpn/v0Y=\r
+SHA1-Digest: ym1RGPdw0fPzsD3r15cz2o6WHCM=\r
 \r
 Name: org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathContainerSelecti\r
  onPage$CPathContainerLabelProvider.class\r
@@ -5951,7 +5951,7 @@ SHA1-Digest: 7tozFDxlG+7efYwr2h5cxETntl8=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage.cl\r
  ass\r
-SHA1-Digest: ydzqGQxx2mWx4V2j55KdAN7EXbc=\r
+SHA1-Digest: /UWDVLdJN4QPMUvAnNYIYVPc1w0=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/utils/IdentifierResult.c\r
  lass\r
@@ -5999,7 +5999,7 @@ SHA1-Digest: B+sv/8VLQftHPR+nvqioyvqjIX4=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameRefactorin\r
  gInputPage$4.class\r
-SHA1-Digest: w8W7+hYX5fubX10ZM0TJnk16w6o=\r
+SHA1-Digest: khOwBZUlPu4B/W0w0SUuVzboohQ=\r
 \r
 Name: org/eclipse/cdt/internal/corext/template/c/FileTemplateContextTy\r
  pe$CoreVariableResolver.class\r
@@ -6111,7 +6111,7 @@ SHA1-Digest: fUpLTb3yPZCnaMfmE3l7jFuIlRM=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/implementmethod/Paramete\r
  rNamesInputPage.class\r
-SHA1-Digest: z3SKu4LYKZw+AFApiCbDvQtpQhc=\r
+SHA1-Digest: iTx3GP8NgjpXATgDTtOhLSBnABc=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/util/CColorManager.class\r
 SHA1-Digest: RxcXoN2wbH2Kqr1smg4xeG/O25Q=\r
@@ -6171,7 +6171,7 @@ SHA1-Digest: OILlif20fDKloD61wOFFlIacLiE=
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$IndexerPreferenceList\r
  ener.class\r
-SHA1-Digest: 2QWTNTUnLncgAFQn4siB37QYA24=\r
+SHA1-Digest: HGifOmMNi75Do4P8sOH3C0dzpb8=\r
 \r
 Name: org/eclipse/cdt/internal/ui/includebrowser/IBDragSourceListener.\r
  class\r
@@ -6238,7 +6238,7 @@ SHA1-Digest: 4gbDglDePBkGJfCwlAWPNXFiUFc=
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorat\r
  ionControl$3.class\r
-SHA1-Digest: 9cdchrDcLAAveyySpGZdiz3nOpM=\r
+SHA1-Digest: XTQpAo4R49GQhUjfDaeWXScZ238=\r
 \r
 Name: org/eclipse/cdt/ui/actions/CustomFiltersActionGroup$ShowFilterDi\r
  alogAction.class\r
@@ -6281,7 +6281,7 @@ SHA1-Digest: o65EsJ8m+1pZjUsR7UMxV9VGRU8=
 \r
 Name: org/eclipse/cdt/internal/ui/text/AbstractCompareViewerInformatio\r
  nControl$1$1.class\r
-SHA1-Digest: zvyQAeg7t6RMlwEOeY+PAzap+6Q=\r
+SHA1-Digest: //PCLb6OFrQwDV1jOFI/qi/rETM=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CodeTemplateBlock.class\r
 SHA1-Digest: cj+zjErYf1wId6ZC5JtXbCMiVmA=\r
@@ -6302,16 +6302,16 @@ SHA1-Digest: e8ZkzpaojuJXMhz8ybdKk+wXdLY=
 Name: org/eclipse/cdt/internal/ui/editor/SemanticHighlighting.class\r
 SHA1-Digest: AMiv1dJx29cFDhz4vplqais4jnU=\r
 \r
+Name: META-INF/maven/org.eclipse.cdt/org.eclipse.cdt.ui/pom.xml\r
+SHA1-Digest: aezDI2Zfw73u7WriAbn/fCc3DSU=\r
+\r
 Name: org/eclipse/cdt/internal/ui/refactoring/implementmethod/Paramete\r
  rInfo.class\r
 SHA1-Digest: +NCkDYLbXcwdn9sOBadqDimXfkk=\r
 \r
-Name: META-INF/maven/org.eclipse.cdt/org.eclipse.cdt.ui/pom.xml\r
-SHA1-Digest: F7LDWGm9pzjwKVNuvkoWosgvXrM=\r
-\r
 Name: org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBloc\r
  k.class\r
-SHA1-Digest: wErbSJ5ThUuSPsbcAaoDoyNy0O8=\r
+SHA1-Digest: sHTfCTaudeKh6OFd1yi3dOguSx4=\r
 \r
 Name: org/eclipse/cdt/internal/ui/resources/ResourceExclusionContribut\r
  or$2.class\r
@@ -6324,7 +6324,7 @@ Name: icons/obj16/person-me.gif
 SHA1-Digest: 9lW6O94X0+FVuXaig24Tj28MeFA=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$3.class\r
-SHA1-Digest: NnDaU5aVa6RWjkWFOMMc8D++0J8=\r
+SHA1-Digest: I5xaAzWCE9oC3rb6U5iqpEBtuus=\r
 \r
 Name: org/eclipse/cdt/internal/ui/dialogs/TypedViewerFilter.class\r
 SHA1-Digest: uATu8VHyzlRA8RNBYbFVDZF/U/o=\r
@@ -6465,6 +6465,10 @@ SHA1-Digest: HOu8Hb8Sr+sni+/pSTi9Q7TnE38=
 Name: org/eclipse/cdt/ui/templateengine/uitree/UIElement.class\r
 SHA1-Digest: /T48Gbna2aHFV96n+u2KV6wrmkU=\r
 \r
+Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Access\r
+ orFactory.class\r
+SHA1-Digest: j42PY1JGtQYBf3bbBiZBchLBwNI=\r
+\r
 Name: org/eclipse/cdt/internal/ui/preferences/formatter/ModifyDialogTa\r
  bPage$ComboPreference.class\r
 SHA1-Digest: uFX8n+j2joI0Ydd9J7JVafJ+W3A=\r
@@ -6555,7 +6559,7 @@ SHA1-Digest: E/gbbpLT2mg43kh5wghzwQz00YQ=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameLocalProce\r
  ssor.class\r
-SHA1-Digest: /l4Z308Yqh41z8MuTOwYttZ2YFY=\r
+SHA1-Digest: NTgiwz0lGGajnK6xfkaTqjG3UnA=\r
 \r
 Name: org/eclipse/cdt/internal/ui/cview/CViewActionGroup.class\r
 SHA1-Digest: Hx7Dbgrb3UAgMiswZdA27QRzfqM=\r
@@ -6672,7 +6676,7 @@ SHA1-Digest: 6HPbes6ARPLqyUlgohjCqXuLUB0=
 \r
 Name: org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardUt\r
  il.class\r
-SHA1-Digest: 1EslSyzrDqmjk+cV9/g84ZpEdyI=\r
+SHA1-Digest: geoAp1Ll6U9Z4UVpUZSM4w4g490=\r
 \r
 Name: icons/dlcl16/configure_annotations.gif\r
 SHA1-Digest: jB2b2qhh1meTSde1O/MFBzI3E9A=\r
@@ -6683,7 +6687,7 @@ SHA1-Digest: Qytpjuggt+lH3+2j0azJLqUmcys=
 \r
 Name: org/eclipse/cdt/internal/ui/editor/SemanticHighlightingPresenter\r
  $HighlightingPositionUpdater.class\r
-SHA1-Digest: sv5Xh0DbiEiTu6kukeoBBTfNtvY=\r
+SHA1-Digest: Lr20Kw6ayNKlEf75p5LtW3o+aB0=\r
 \r
 Name: org/eclipse/cdt/ui/wizards/NewCProjectWizard$1.class\r
 SHA1-Digest: 82f6Q3MlGYZfiIQPtxbY3togEJ0=\r
@@ -6819,7 +6823,7 @@ SHA1-Digest: isOVgKsqpf3vNwd1p6XORX1xzcA=
 \r
 Name: org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassCodeGene\r
  rator.class\r
-SHA1-Digest: IjudmPKkqGj0DqX9hDGaqOsl/Jg=\r
+SHA1-Digest: p0nT6ikf0tViVk2DHRMOUucFJa4=\r
 \r
 Name: org/eclipse/cdt/internal/ui/wizards/classwizard/SourceFileSelect\r
  ionDialog$FieldsAdapter.class\r
@@ -7012,7 +7016,7 @@ SHA1-Digest: 6WkSOwj+J0o12mahZDYQTNPf5fc=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameProcessorD\r
  elegate$1.class\r
-SHA1-Digest: HbGatoHdBPk9O+JpQU8kQTiZ88s=\r
+SHA1-Digest: v9Fk9Kd2raHKZOdjDdJf2JKdi08=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/CInformationProvider$Co\r
  ntrolCreator.class\r
@@ -7032,12 +7036,12 @@ SHA1-Digest: J38QIhJMZ6Tf3kPBhApADBm0Ei8=
 Name: org/eclipse/cdt/internal/ui/editor/CAnnotationIterator.class\r
 SHA1-Digest: XBzd6F9v+jKnKiBkjcQU+us0g5c=\r
 \r
-Name: org/eclipse/cdt/internal/ui/refactoring/DocumentAdapter$1.class\r
-SHA1-Digest: AK5s9pXQXeEP95UpcwIQPFpNuEM=\r
-\r
 Name: templates/default-filetemplates.xml\r
 SHA1-Digest: vhoA8XmsuIbN1vr4NAgofNm24nc=\r
 \r
+Name: org/eclipse/cdt/internal/ui/refactoring/DocumentAdapter$1.class\r
+SHA1-Digest: AK5s9pXQXeEP95UpcwIQPFpNuEM=\r
+\r
 Name: org/eclipse/cdt/internal/ui/callhierarchy/CHViewPart$2.class\r
 SHA1-Digest: Z0+Aox88zZvs4PNDlXk2nuRvazE=\r
 \r
@@ -7059,7 +7063,7 @@ Name: org/eclipse/cdt/internal/ui/wizards/settingswizards/MacroSetting
 SHA1-Digest: +iJioFu9m8Pl8fUsDBhQT9fpqdk=\r
 \r
 Name: org/eclipse/cdt/ui/newui/AbstractLangsListTab$7.class\r
-SHA1-Digest: xRGZsM/RCuNJkNx6TEzgcyCAM1I=\r
+SHA1-Digest: akBbYaY2VxHa4RV65tRqltIPvio=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/correction/ContributedProcessor\r
  Descriptor.class\r
@@ -7157,7 +7161,7 @@ SHA1-Digest: 6FchXqTOfMoykO4UF+Y1m8ZWlyA=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameMethodProc\r
  essor.class\r
-SHA1-Digest: Y5Q8fN8p6pa3eZKj4wDNAftIs2o=\r
+SHA1-Digest: 6M+Pnoly9rtrUNP2kFMa6GOSasg=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/formatter/BracesTabPage$\r
  1.class\r
@@ -7199,7 +7203,7 @@ SHA1-Digest: hiBx1joSvUKcRt6/6VJ0Vg7z/tU=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameRefactorin\r
  gInputPage.class\r
-SHA1-Digest: q7wv0qc6+mfAC3JW7Iom/FLvKXM=\r
+SHA1-Digest: ugXmcjuppf18IYTbfSdCcj9ZW5M=\r
 \r
 Name: org/eclipse/cdt/ui/newui/SymbolDialog$2.class\r
 SHA1-Digest: mr8GupmPKko2Dt4l+7K13Y0eZYo=\r
@@ -7372,11 +7376,11 @@ SHA1-Digest: SS5ZiTPIWmehrN+hwNy5l76qSgI=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Genera\r
  teGettersAndSettersInputPage$6.class\r
-SHA1-Digest: i8a0cIMsGbIneqMQnhmoxOfBOwE=\r
+SHA1-Digest: SYBtuVzl21PzTRNFEk2kjWVpWDw=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/SemanticHighlightingManager$H\r
  ighlightingStyle.class\r
-SHA1-Digest: R4U+uLWSlsqbg71QP3XaTpNuS/Q=\r
+SHA1-Digest: VUHOq1WDwIWVQP9/ElejgFkC0Kg=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/CWordIterator.class\r
 SHA1-Digest: 0FHRqnrluALbpKoWgXrs+DX3y+0=\r
@@ -7402,11 +7406,11 @@ SHA1-Digest: KsRJgX6NgIInJaCIp4wdxJ9Tl6A=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRefactoringMatch\r
  .class\r
-SHA1-Digest: hGye3yDj3V1GH4sb50hQl7L2hFo=\r
+SHA1-Digest: 6x2DLXfsJgOSMH3+/BUvHnuEnGc=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameProcessorD\r
  elegate.class\r
-SHA1-Digest: oSfwwqyF0vji1dLTDKJQ/VWJBAk=\r
+SHA1-Digest: 8BiwW8hjNJL7dUx1aSjnCuPoI1w=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/formatter/ModifyDialogTa\r
  bPage$ButtonPreference.class\r
@@ -7516,7 +7520,7 @@ Name: icons/elcl16/backward_nav.gif
 SHA1-Digest: qx89HZcOfCNP8URrsbXsnJSbNro=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$9.class\r
-SHA1-Digest: AG/2Oacaj8ToT/za7Guy749u5jo=\r
+SHA1-Digest: +nGQ77hAezpE3WpXyHGRL9oljk8=\r
 \r
 Name: org/eclipse/cdt/ui/CUIPreferenceInitializer.class\r
 SHA1-Digest: HVSYXwBSDiEAH+BLEPS8u6fsHjM=\r
@@ -7537,7 +7541,7 @@ Name: org/eclipse/cdt/internal/ui/typehierarchy/THHistoryListAction.cl
 SHA1-Digest: ibsVZixQ8V6RMgl+CBf9dJ+H2Xw=\r
 \r
 Name: org/eclipse/cdt/internal/corext/util/Resources.class\r
-SHA1-Digest: e4zRzQQ3qCIhLliJ/sthQNG6qY0=\r
+SHA1-Digest: nabOeXY+pp0MiX/zNdfkFbmX6rg=\r
 \r
 Name: org/eclipse/cdt/ui/actions/ExcludeFromBuildAction$1.class\r
 SHA1-Digest: v/rl0IWjQ84yby7/ZpPLNjaTc4I=\r
@@ -7611,7 +7615,7 @@ SHA1-Digest: qzoLlCGE08OnPNq/i1wcEBD0jL8=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameRefactorin\r
  gInputPage$3.class\r
-SHA1-Digest: vPUCYXyEXRyS3Ivv77PE5QdvTQI=\r
+SHA1-Digest: /IseFV9jRQsmcUbnPJzNCw31ENs=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/doctools/DocCommentOwnerManager\r
  .class\r
@@ -7619,7 +7623,7 @@ SHA1-Digest: GozVbD48xblofVac/T+qw6Oea3U=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/RenameMessages.pr\r
  operties\r
-SHA1-Digest: dSQW8jewSZTdCCIIclTEqysw4tI=\r
+SHA1-Digest: 7asg50A65jwMupASES7ZkCeHQPE=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/RefactoringSaveHelper.cl\r
  ass\r
@@ -7674,7 +7678,7 @@ SHA1-Digest: y4b3Lnud+8rs95Qc9lvswucoft0=
 \r
 Name: org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsJob.c\r
  lass\r
-SHA1-Digest: IOYRDTM6RH1B7ZPahUB1tdpayZ8=\r
+SHA1-Digest: ZGElGKlZq2aHdq9UxUw1DrUjuKA=\r
 \r
 Name: org/eclipse/cdt/internal/ui/CWorkbenchAdapter.class\r
 SHA1-Digest: 06sbG1T3HBhskG2h+EOwfMC1nqA=\r
@@ -7684,7 +7688,7 @@ SHA1-Digest: CG+fjoz8gEKQctOCBS9fpOXJxbs=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage$5.\r
  class\r
-SHA1-Digest: hTecxZnzVuvQXn3RjNeYmdRtNU8=\r
+SHA1-Digest: PmYQqE4+0Ze5J8yQv7hv8fEDQbA=\r
 \r
 Name: org/eclipse/cdt/ui/dialogs/RegularExpressionStatusDialog.class\r
 SHA1-Digest: EnxA7nPkYiH6c28gihga7+lp9Wk=\r
@@ -7734,7 +7738,7 @@ Name: org/eclipse/cdt/internal/ui/search/PDOMSearchPatternQuery.class
 SHA1-Digest: fbndLVf1HRy44M5ZPMeS84i/QZo=\r
 \r
 Name: org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage.class\r
-SHA1-Digest: Z2gO2cQHLY0i7UUQhGZxhwaLhyA=\r
+SHA1-Digest: Cu58R6Xd0a5907IbD7MNj3jOZl8=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/CRefactoring.class\r
 SHA1-Digest: WKCov24VsusKGplHzlrreyHzzm0=\r
@@ -7867,7 +7871,7 @@ SHA1-Digest: czDwQTRpCJQ4r+UWxGcRlDkNr/g=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper\r
  $2.class\r
-SHA1-Digest: gkR05unbPVF68ZUCRZ3Xlm/cK60=\r
+SHA1-Digest: vhiVnxSaROZ5R8IrVgyv7FYFnTE=\r
 \r
 Name: org/eclipse/cdt/ui/newui/RenameConfigurationDialog$1.class\r
 SHA1-Digest: E2yKPWvj3t0vgg2gR6k88HfoMGA=\r
@@ -7915,7 +7919,7 @@ Name: org/eclipse/cdt/internal/ui/refactoring/togglefunction/Declarato
 SHA1-Digest: chR4FkSU3aA3WegWuKBf1UG8xDw=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$2.class\r
-SHA1-Digest: tdRgqaKYtiyCv2HsipYkncqfnEg=\r
+SHA1-Digest: 4fiUVZ+X6zhdXzlI4Vaj7Q9nPDo=\r
 \r
 Name: org/eclipse/cdt/ui/newui/EnvironmentTab$4.class\r
 SHA1-Digest: 3bopB4fgx7kbH3KRPjRrzuyCIjM=\r
@@ -7946,7 +7950,7 @@ Name: org/eclipse/cdt/internal/ui/refactoring/RefactoringSaveHelper$2.
 SHA1-Digest: Y/VaW2R1ejozx+CoAf3okeOQ4DE=\r
 \r
 Name: plugin.xml\r
-SHA1-Digest: 4/e3oelx5uhtWOXFPYHBT/+qnkE=\r
+SHA1-Digest: FExzTWgmA0KCRaGlGFoy2NUSQIE=\r
 \r
 Name: org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePartition.c\r
  lass\r
@@ -8200,7 +8204,7 @@ SHA1-Digest: l8NSbbNLeFVB9b5N5XDtMOi9LDA=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/utils/EclipseObjects.cla\r
  ss\r
-SHA1-Digest: T9xz76Kz9YDVNwQpPkseUBC49p0=\r
+SHA1-Digest: 3jYa7ZuY833Ps6D6bQ1DJY2b2VQ=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/spelling/SpellingPreferences.cl\r
  ass\r
@@ -8382,7 +8386,7 @@ SHA1-Digest: q2xH728JF1PHg0BQQ7Idsq5+V2A=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper\r
  $SearchScope.class\r
-SHA1-Digest: CJZL2e+czUJv2yRjTdHxO5dKvq8=\r
+SHA1-Digest: YwpeGNC8RR2r2HGGMyIAFL5UFic=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/dialogs/CTextEditChangeP\r
  reviewViewer$CompareElement.class\r
@@ -8436,7 +8440,7 @@ SHA1-Digest: 93+Vq4jyxInjrxdTxM/TkjrQ1/0=
 \r
 Name: org/eclipse/cdt/internal/ui/text/CReconciler$IndexerListener.cla\r
  ss\r
-SHA1-Digest: NuxJ2nac6aOJWo46rny7VxNQ2uY=\r
+SHA1-Digest: 261iwdN0R1/HGBCNhT4D5cpMZBs=\r
 \r
 Name: org/eclipse/cdt/internal/ui/dnd/TransferDropTargetListener.class\r
 SHA1-Digest: CJ1o+lVdU02NSwUoLgLE7Pu51CY=\r
@@ -8538,7 +8542,7 @@ SHA1-Digest: hnEB5juQ3iqYjrLudXAOpyJx9WA=
 \r
 Name: org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconcile\r
  r$2$1.class\r
-SHA1-Digest: o9iP1nfy2S4AoE+58eyHBiPH2yM=\r
+SHA1-Digest: rCKj07Gs8p9LPXistF3jqriHr+o=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/contentassist/HippieProposalCom\r
  puter.class\r
@@ -8596,7 +8600,7 @@ Name: org/eclipse/cdt/internal/ui/util/ExternalEditorInputFactory.clas
 SHA1-Digest: OrElRv8l9r8OaLN4Ar0GkXSV0BY=\r
 \r
 Name: org/eclipse/cdt/ui/dialogs/IndexerBlock$3.class\r
-SHA1-Digest: Fnx0PcQy7vKGjQzBi2JQUZFd9qQ=\r
+SHA1-Digest: a+K0lC4H7VsttKceM4m4V8lY1iA=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/ProblemHover$ProblemInf\r
  o.class\r
@@ -8624,7 +8628,7 @@ SHA1-Digest: 1UwM/BQVu2MAnBoFFEmDjXcObQ4=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBloc\r
  k$3.class\r
-SHA1-Digest: 5sJ9J7QWkRzY6sxuOazeOnXvd58=\r
+SHA1-Digest: 5U7AS/tqPBiA0wKRJ0/Udl+6XUY=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/TodoTaskConfigurationBlo\r
  ck$TodoTask.class\r
@@ -8632,7 +8636,7 @@ SHA1-Digest: U9vln4SkkAIl9/HyU/VhZ8blCJE=
 \r
 Name: org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsJob$3\r
  .class\r
-SHA1-Digest: p2tQEAbXih2lhExU4N7NnIPmLKg=\r
+SHA1-Digest: cUXBY1WREapmda9CdXAHGcSsEXs=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/RenameLinkedMode$\r
  ExitPolicy.class\r
@@ -8644,7 +8648,7 @@ SHA1-Digest: Bl3F3jM17uIL+X9i2bf7kh5sEn4=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/RefactoringExecutionHelp\r
  er$1.class\r
-SHA1-Digest: XgqQaEvGK5/P4SNjrnVPK5HGRcI=\r
+SHA1-Digest: Pd0aEHCAE6fsLStbaabvK1jyLfc=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/EditTemplateDialog.class\r
 SHA1-Digest: /ECLiHegSRnfeqRCCBhlJbOp8rk=\r
@@ -8693,7 +8697,7 @@ SHA1-Digest: qeBLP7mDMgUwroL43FCLBFehRhg=
 \r
 Name: org/eclipse/cdt/internal/ui/text/AbstractCompareViewerInformatio\r
  nControl$1.class\r
-SHA1-Digest: i4PY+vmBwgbww2090CVX2VZmvys=\r
+SHA1-Digest: +tU6FA163cL3gMC84Kc3IvWNF/M=\r
 \r
 Name: icons/obj16/structfo_obj.gif\r
 SHA1-Digest: X6XOj58emtP95g2yUzaDw73OmBg=\r
@@ -8755,10 +8759,6 @@ SHA1-Digest: G0cUxMrgAGc03UtKWOqnq5f5Npg=
 Name: org/eclipse/cdt/ui/dialogs/ICOptionPage.class\r
 SHA1-Digest: bqKElY0DlqArsqHIzvR/lxqFPMI=\r
 \r
-Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Getter\r
- SetterInsertEditProvider$AccessorKind.class\r
-SHA1-Digest: F03DtbyuIN2c2F0bKdKCRT1Mx7E=\r
-\r
 Name: icons/dlcl16/search_prev.gif\r
 SHA1-Digest: T3L8e1sNqbDjz7KGvcvnzBCTKaQ=\r
 \r
@@ -8777,7 +8777,7 @@ SHA1-Digest: tA3qy0SyvTsl2iHSfC0CpivFuNA=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/implementmethod/MethodDe\r
  finitionInsertLocationFinder.class\r
-SHA1-Digest: dueqQ7P7W5EertZFlcvcVWIL1dM=\r
+SHA1-Digest: uH6vK0AC+S+vGoWBVLPoYc6XSRM=\r
 \r
 Name: org/eclipse/cdt/internal/ui/cview/CView$6.class\r
 SHA1-Digest: vgtOYUnhlx6LhZx6zMf6SMVK3As=\r
@@ -8825,11 +8825,11 @@ Name: icons/obj16/method_protected_obj.gif
 SHA1-Digest: yO3DL7gZmzMzN1lzBmUsP6rR2to=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRefactory.class\r
-SHA1-Digest: SLeLZ9c3pocR/QKjWvMXSB3k/eY=\r
+SHA1-Digest: M9hNgWnKG4WTEjbaDvs21FfXG0Y=\r
 \r
 Name: org/eclipse/cdt/ui/newui/AbstractLangsListTab$RichLabelProvider.\r
  class\r
-SHA1-Digest: Kl0mUBLJZmpJ+M78KMz+N5FBr8k=\r
+SHA1-Digest: 5wfl6tYfUOlW02bm6gBjz9SoS0c=\r
 \r
 Name: org/eclipse/cdt/internal/corext/template/c/FileTemplateContextTy\r
  pe.class\r
@@ -8845,11 +8845,11 @@ SHA1-Digest: 1dCkcQC7KracgPIcVD51tj7ECFI=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Genera\r
  teGettersAndSettersInputPage$5.class\r
-SHA1-Digest: xRP93ZWWrMg2ISKduwTZt3lvmq0=\r
+SHA1-Digest: UJaAcU/YQHDi6JAx1+Hy7+LwYGg=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Getter\r
  SetterNameGenerator.class\r
-SHA1-Digest: BuvJ9e2UfLJR4wpvNY7VeVVbyoE=\r
+SHA1-Digest: PzHcW7MaAKNaiL0T5Z1lYKvre5Q=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/formatter/ModifyDialogTa\r
  bPage.class\r
@@ -8912,7 +8912,7 @@ SHA1-Digest: q/40hanxyxZOK7mIBEJBe/u6SZM=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameIncludePro\r
  cessor.class\r
-SHA1-Digest: YZsA6WDVB3pE22LFp5PwE8UTmhY=\r
+SHA1-Digest: x8klJ3iq1Zgx+5YegRQnA9YJamY=\r
 \r
 Name: icons/obj16/keyword_obj.gif\r
 SHA1-Digest: svouEFPEv9Y/0QOdjpR4qAleV80=\r
@@ -8972,13 +8972,13 @@ Name: org/eclipse/cdt/internal/ui/typehierarchy/THViewPart$14.class
 SHA1-Digest: 25QSJgCcZSG2fCreSToFGxhr0U4=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$8.class\r
-SHA1-Digest: 6otc0Vi55tpuP5hd6OqjsgCP1Bk=\r
+SHA1-Digest: 4qYWkItTJui/b57KmoIHdN2e6jM=\r
 \r
 Name: icons/elcl16/wordassist_co.gif\r
 SHA1-Digest: WpYGr6/zGF8jxD/vmC2nbZjWA6Y=\r
 \r
 Name: org/eclipse/cdt/ui/refactoring/CTextFileChange.class\r
-SHA1-Digest: WVH8RmOZos9ff60ntLqIKaZdZ+Q=\r
+SHA1-Digest: ohMcxSfc5zMrS4t4Zxt6piI9EKw=\r
 \r
 Name: org/eclipse/cdt/internal/ui/util/PendingUpdateAdapter.class\r
 SHA1-Digest: Dz6bTB6xdDF1nzjyuGtlkLMpY50=\r
@@ -8987,6 +8987,10 @@ Name: org/eclipse/cdt/internal/ui/preferences/PropertyAndPreferencePag
  e$2.class\r
 SHA1-Digest: cU9KmwGR9L+6+TsTrJpZO9KQHjo=\r
 \r
+Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Access\r
+ orFactory$GetterFactory.class\r
+SHA1-Digest: xnpDkN5omkQ3IVuFopywJ8806Dc=\r
+\r
 Name: org/eclipse/cdt/ui/refactoring/actions/GettersAndSettersAction.c\r
  lass\r
 SHA1-Digest: isyQ+4mA3XgibzBfmFP56eLfn4I=\r
@@ -9061,7 +9065,7 @@ SHA1-Digest: unJnaw4eH+kvqY0LFdLkBE3F7CA=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameRefactorin\r
  gInputPage$2.class\r
-SHA1-Digest: 9wxoM2eDOBYpmO4aY69h1Cy/CjA=\r
+SHA1-Digest: z99XqCrRab2M8KNqu5K05TK1H+0=\r
 \r
 Name: org/eclipse/cdt/ui/CElementLabelProvider.class\r
 SHA1-Digest: 6KcQiQt9EwnTtHjbpYBEZwY6Ba0=\r
@@ -9143,7 +9147,7 @@ SHA1-Digest: eG5AcGLKhDxoNF1nzBQTvy2SsxM=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage$4.\r
  class\r
-SHA1-Digest: d8Zx6Hc8DLiJE+vZgyGCVmbZiq4=\r
+SHA1-Digest: 6aNzD5SGP6+udKJbdBN8eFEDsO8=\r
 \r
 Name: icons/obj16/never_translate.gif\r
 SHA1-Digest: JM7bCdPDq2mNvyXguU9KlfcuMLs=\r
@@ -9306,6 +9310,10 @@ SHA1-Digest: 26C+PIcO7vP3WgzFdcx4Yxb7H3g=
 Name: org/eclipse/cdt/internal/ui/ICHelpContextIds.class\r
 SHA1-Digest: qPOMWxJghymA6hSi+PaKHmUwqVA=\r
 \r
+Name: org/eclipse/cdt/internal/ui/refactoring/rename/RenameSupport$Dia\r
+ logResult.class\r
+SHA1-Digest: iY2MrdF3yjZX8xVjn9yVzen0eHg=\r
+\r
 Name: org/eclipse/cdt/internal/ui/refactoring/extractlocalvariable/Ext\r
  ractLocalVariableRefactoring$1.class\r
 SHA1-Digest: KewnF58+F1eixblnGwyDd0XtN98=\r
@@ -9353,14 +9361,14 @@ SHA1-Digest: KnK7Dy/P6w/ohrvBwrdNrivepjE=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper\r
  $1.class\r
-SHA1-Digest: TbN1OMNj6EOUY7RSfp8RTP5YKrI=\r
+SHA1-Digest: AcnTjXEzVDsXpW8ot+jp6Mfm44s=\r
 \r
 Name: org/eclipse/cdt/ui/newui/ProjectContentsArea$2.class\r
 SHA1-Digest: u4LCAGPEAnJNopx4HE5gxO4Kg7E=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/RenameSupport.cla\r
  ss\r
-SHA1-Digest: IHPWHlgFSGpegmCE9ObkSj4ihxY=\r
+SHA1-Digest: jdJtbzXVA3brroRT4U5zuhOc/b8=\r
 \r
 Name: org/eclipse/cdt/internal/ui/navigator/CNavigatorRefactorActionPr\r
  ovider.class\r
@@ -9418,7 +9426,7 @@ Name: org/eclipse/cdt/ui/newui/StructureTreeTab$LevelDialog.class
 SHA1-Digest: AXohyxK4/tg+0/+Ha0PRn7bUMoE=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$1.class\r
-SHA1-Digest: QmcS8V+CNys9lZqX0gf+1acLBo4=\r
+SHA1-Digest: rs+AoUCUDxwllTjNKbVrv48HFfw=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/CHeuristicScanner$NonJavaIdenti\r
  fierPart.class\r
@@ -9692,7 +9700,7 @@ Name: org/eclipse/cdt/internal/ui/viewsupport/StorageLabelProvider.cla
 SHA1-Digest: mDLJwfJWZgtwjGXsD9KEiwqfD6g=\r
 \r
 Name: org/eclipse/cdt/internal/ui/BaseCElementContentProvider.class\r
-SHA1-Digest: VB2Ig+AjjwwHus7Ypnbok50NNnI=\r
+SHA1-Digest: EhMJrVc/T9a1BS1SiWpAg9lc4fA=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/spelling/engine/ISpellCheckEngi\r
  ne.class\r
@@ -9739,7 +9747,7 @@ SHA1-Digest: W58JsCXUMwT99Bkjng2VYMBvMec=
 \r
 Name: org/eclipse/cdt/internal/ui/editor/SemanticHighlightingReconcile\r
  r.class\r
-SHA1-Digest: 00AehEhAC4p3IaUyDEQwhcYrzII=\r
+SHA1-Digest: 09M8UE6GPyRCXaeDcmONCwwci7E=\r
 \r
 Name: icons/elcl16/open_include.gif\r
 SHA1-Digest: 5uorTPM3yjxrRe97ZyoIACFwGG4=\r
@@ -9776,7 +9784,7 @@ SHA1-Digest: 8g/8F2EhVwi+i/5QtK8jaKxDv1U=
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/SourceViewerInformation\r
  Control$2.class\r
-SHA1-Digest: e0Nrv61nlHlju/QjGhR0hIek7R4=\r
+SHA1-Digest: 6a0cbw1rZOPt7sDzzfqCe3i0isE=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/NodeContainer$NameInform\r
  ation.class\r
@@ -9798,10 +9806,10 @@ SHA1-Digest: 5mWtvnF5bevl3ZqADy8MD0iJ4fI=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Genera\r
  teGettersAndSettersInputPage.class\r
-SHA1-Digest: gtB/ACmdykRxVvtGOLXBJGh5wJI=\r
+SHA1-Digest: 65/tF3sCSgLmMjrsPCv4FxC5THQ=\r
 \r
 Name: org/eclipse/cdt/ui/newui/AbstractLangsListTab.class\r
-SHA1-Digest: EiR4qYX6g7wiLYjLvXtm2/jPRLs=\r
+SHA1-Digest: 7PQPMoitHQBWAhpUCEVjNQXRY7U=\r
 \r
 Name: org/eclipse/cdt/internal/ui/wizards/settingswizards/ProjectSetti\r
  ngsWizardPage$5.class\r
@@ -9887,7 +9895,7 @@ SHA1-Digest: WyiWifk8p/KC4Zv810Eq/qcuP+Q=
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$OccurrencesFinderJobC\r
  anceler.class\r
-SHA1-Digest: Cgc9NB+pcStVfN0pwNNTF+Bjndc=\r
+SHA1-Digest: 65fjJkLX2LgYiTYdEgqAAVUrMvg=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/contentassist/KeywordCompletion\r
  ProposalComputer.class\r
@@ -9956,7 +9964,7 @@ SHA1-Digest: CErQlGU5pzkNe3bRW7ixGfX/xZI=
 \r
 Name: org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsJob$N\r
  ameKind.class\r
-SHA1-Digest: Am3iu4QjEuyxgVy44zMFj6+vdOk=\r
+SHA1-Digest: SF6hIT5Cok54q+IHAgKI2ifoYJ4=\r
 \r
 Name: org/eclipse/cdt/internal/ui/viewsupport/ProjectTemplateStore.cla\r
  ss\r
@@ -9967,7 +9975,7 @@ SHA1-Digest: RQXpLCwGwO2SKbD5h5J894Eotis=
 \r
 Name: org/eclipse/cdt/internal/ui/text/contentassist/InclusionProposal\r
  Computer.class\r
-SHA1-Digest: wj1EcOi5fWtFTQq/KrBXgsX6P9o=\r
+SHA1-Digest: kCVib/LzOSCrK3FGEA+BtYDEEJk=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/formatter/WhiteSpaceTabP\r
  age.class\r
@@ -10074,7 +10082,7 @@ Name: org/eclipse/cdt/internal/ui/refactoring/dialogs/ValidatingLabele
 SHA1-Digest: qLUwV7/Y7RNXqwkyuRXZcGInHzI=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/template/TemplateEngine.class\r
-SHA1-Digest: LkuWiYk4dgrkQvc5zl3VbVV9C90=\r
+SHA1-Digest: RUVlTShZ2zX04t4ZiDnkAYs6W4s=\r
 \r
 Name: org/eclipse/cdt/internal/ui/actions/SurroundWithActionGroup$2.cl\r
  ass\r
@@ -10094,7 +10102,7 @@ SHA1-Digest: zpCgp774S5OTQS8ZqsE44oTecTg=
 \r
 Name: org/eclipse/cdt/ui/wizards/NewClassCreationWizardPage$FileGroupF\r
  ieldAdapter.class\r
-SHA1-Digest: n7bNUfLxij+ulu0+WXlf4AUeufE=\r
+SHA1-Digest: f7tOXKF+liEexdREuRbOF24RKKE=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/AbstractPreferencePage.c\r
  lass\r
@@ -10119,6 +10127,10 @@ SHA1-Digest: Q4SMgpT8EAqNu7MYs/qvLSso3XI=
 Name: org/eclipse/cdt/ui/newui/CLocationOutputTab.class\r
 SHA1-Digest: 6MpJHhucz+3vnmSMVpBsVBgWK/s=\r
 \r
+Name: org/eclipse/cdt/internal/ui/refactoring/rename/RenameSupport$Dia\r
+ logMode.class\r
+SHA1-Digest: 9IrdcL1Al6ipFR5dV9L5z8hlEPM=\r
+\r
 Name: icons/wizban/addpath_wiz.gif\r
 SHA1-Digest: BsklqQ9glR15oukDdaxP+na9hfo=\r
 \r
@@ -10187,7 +10199,7 @@ SHA1-Digest: U1wbUTmSjDcxrk6w9O20yCWu2v4=
 \r
 Name: org/eclipse/cdt/internal/ui/callhierarchy/CallHierarchyUI$1$1.cl\r
  ass\r
-SHA1-Digest: b9ufw6Tqp3HePkUE4HB2yvfLoGo=\r
+SHA1-Digest: 71LkcOTcJj7s06/dAAfKyIr8DDg=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/AbstractConfigurationBlo\r
  ck$3.class\r
@@ -10222,7 +10234,7 @@ Name: org/eclipse/cdt/internal/ui/dialogs/MessageLine$1.class
 SHA1-Digest: 4cWTORy7dqMiB9noqyDujzmR7io=\r
 \r
 Name: org/eclipse/cdt/ui/dialogs/IndexerBlock$2.class\r
-SHA1-Digest: vTLpaQmUM7ffWUwCn+N7tlwO5Q8=\r
+SHA1-Digest: 5g0v/9E+cIw35gj628/LxqEVX38=\r
 \r
 Name: icons/wizban/newhfile_wiz.gif\r
 SHA1-Digest: 52klvVDKkjyjurGrF6KTec7lzJk=\r
@@ -10235,7 +10247,7 @@ SHA1-Digest: B5ioe+DbTm+/mQfbVQR1843+PVk=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBloc\r
  k$2.class\r
-SHA1-Digest: hinkWnhpCfC5uRx30xyYgKaRsII=\r
+SHA1-Digest: LueeESU/Lpzw5d4QpLiGKmtGEO0=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/ChangeExceptionHandler$N\r
  otCancelableProgressMonitor.class\r
@@ -10263,7 +10275,7 @@ SHA1-Digest: gHBVWj/Qr+BkbkwXjkjZyr9Z6tA=
 \r
 Name: org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsJob$2\r
  .class\r
-SHA1-Digest: +LirMevImfn+HV6fqyvHb3oB7OE=\r
+SHA1-Digest: B1LSev66mYN0GB8j2E6iqeVyUIs=\r
 \r
 Name: icons/dtool16/newclass_wiz.gif\r
 SHA1-Digest: mRtiYYMZuTDIAREl3QE2jSc8GNo=\r
@@ -10308,7 +10320,7 @@ Name: icons/etool16/config-compiler.gif
 SHA1-Digest: WtRCkxJjruoZdS8/xinBX9h8LF4=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover$3.class\r
-SHA1-Digest: JCJdZzbznbxwCuvHRyv+nVA5nts=\r
+SHA1-Digest: 87n3dDStYXER93RD0NcAfOkWjSo=\r
 \r
 Name: org/eclipse/cdt/internal/ui/cview/CViewContentProvider.class\r
 SHA1-Digest: VnG59Pb/SfHVoPkRXUFhcPi32e0=\r
@@ -10459,7 +10471,7 @@ Name: org/eclipse/cdt/internal/ui/preferences/formatter/ProfileConfigu
 SHA1-Digest: OGo0ZwabFxrnuJOV2mP/6RtQ/84=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/c/hover/CSourceHover.class\r
-SHA1-Digest: Jteh43nMDcKa6fXi3wD9/khFcW4=\r
+SHA1-Digest: XMQDelNzw5eCwXSblci2rGoW+ss=\r
 \r
 Name: org/eclipse/cdt/internal/corext/template/c/FileTemplateContext.c\r
  lass\r
@@ -10489,7 +10501,7 @@ SHA1-Digest: RHJ9RDxgQozRUfKPDzsfe4T5Etc=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/Genera\r
  teGettersAndSettersInputPage$4.class\r
-SHA1-Digest: vZhRUNKyUe7mKI1V07mTtj4iD68=\r
+SHA1-Digest: 1jkD/nPf5A0Tx6j/32j22D/iqww=\r
 \r
 Name: org/eclipse/cdt/internal/ui/wizards/folderwizard/NewSourceFolder\r
  WizardPage.class\r
@@ -10527,7 +10539,7 @@ SHA1-Digest: Qujy7yX/h+6V9BGhuVBh4Mzxa2M=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBloc\r
  k$AssocLabelProvider.class\r
-SHA1-Digest: qhDakzWigKIPbGZcFhHUtY8Y+Ps=\r
+SHA1-Digest: 0t0PRoxF8eHWbcMof8883RDiO4M=\r
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/extractfunction/ExtractF\r
  unctionInputPage$2.class\r
@@ -10625,7 +10637,7 @@ Name: org/eclipse/cdt/internal/ui/includebrowser/OpenIncludeBrowserAct
 SHA1-Digest: ucFPt5uVGsijMIIgOEtXBLgDw+Q=\r
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$7.class\r
-SHA1-Digest: tDVC7OyiRiycH29lwAyS47/9g0s=\r
+SHA1-Digest: 2x9cCBj/I0wOLqLjwWUNMjhmg5M=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/contentassist/CCompletionPropos\r
  al$ExitPolicy.class\r
@@ -10687,7 +10699,7 @@ Name: org/eclipse/cdt/internal/ui/buildconsole/MultiBuildConsoleAdapte
 SHA1-Digest: K/17j8GctDFXb5WXkMSabRQVVTQ=\r
 \r
 Name: org/eclipse/cdt/internal/ui/text/CReconciler$1.class\r
-SHA1-Digest: ll94wXfgfPSqWDFmwtpn6o7EHQw=\r
+SHA1-Digest: qBO3Z9+RCoZ8R+jzHZ0UPYqisiQ=\r
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/formatter/ModifyDialogTa\r
  bPage$ButtonPreference$1.class\r
@@ -10720,7 +10732,7 @@ SHA1-Digest: eiw3vgjm9v9MkGAoUlZbUn8BY5g=
 \r
 Name: org/eclipse/cdt/internal/ui/refactoring/rename/CRenameRefactorin\r
  gInputPage$1.class\r
-SHA1-Digest: lQSZdVZfWUxSR1rZU8BFc1WjkL0=\r
+SHA1-Digest: JYiwVnEqJsZq7ubMjrCbREYqhS0=\r
 \r
 Name: org/eclipse/cdt/internal/ui/wizards/AbstractWizardDropDownAction\r
  $1.class\r
@@ -10735,7 +10747,7 @@ SHA1-Digest: u6KEkxWn8tJfO2GzefWldZ6+5XI=
 \r
 Name: org/eclipse/cdt/internal/ui/editor/CEditor$OccurrencesAnnotation\r
  UpdaterJob.class\r
-SHA1-Digest: wNI1o/KfAYNzA4Y4Vaxabz1OBfw=\r
+SHA1-Digest: vnd4FqD8UTSO8V1eTjCV/uIeoN4=\r
 \r
 Name: org/eclipse/cdt/ui/text/CSourceViewerConfiguration$6.class\r
 SHA1-Digest: Fz8NoaBBBucAzJtKeHTmA+EnBm4=\r
@@ -10783,7 +10795,7 @@ SHA1-Digest: qiHLJ8le/w+F56FxZJsxwwBhxhE=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CEditorPreferencePage$3.\r
  class\r
-SHA1-Digest: rZtqhNMEc+GC3Of4DEIpXC8oPFE=\r
+SHA1-Digest: 0+iOH4lOOLGMuEBe9EFN9qZ9su8=\r
 \r
 Name: org/eclipse/cdt/internal/ui/filters/FilterDescriptor$2.class\r
 SHA1-Digest: Ftl8CFAoNuvlmjpWEFJ5Dr0rNRE=\r
@@ -10956,7 +10968,7 @@ SHA1-Digest: MQaDO3GPJECO+gs5e2LrLqwmi5k=
 \r
 Name: org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBloc\r
  k$AssocSorter.class\r
-SHA1-Digest: kbYNZ85CDBMdgN2Ae6mfBzf4/0o=\r
+SHA1-Digest: S/HWzLSN1TpTwXh5AfMig8DULRw=\r
 \r
 Name: org/eclipse/cdt/internal/ui/indexview/CountNodeAction$2.class\r
 SHA1-Digest: WbNZTW51DzOK3J2GRxKFxXIl6mI=\r
index 54025e7..29ef1bf 100644 (file)
@@ -1,5 +1,5 @@
 #Generated by Maven
-#Thu Sep 15 12:22:05 EDT 2011
-version=5.3.1-SNAPSHOT
+#Sat Feb 11 14:26:39 EST 2012
+version=5.3.2-SNAPSHOT
 groupId=org.eclipse.cdt
 artifactId=org.eclipse.cdt.ui
index 04a7dff..5fe23b4 100644 (file)
@@ -7,11 +7,11 @@
        <parent>
                <groupId>org.eclipse.cdt</groupId>
                <artifactId>cdt-parent</artifactId>
-               <version>8.0.0-SNAPSHOT</version>
+               <version>8.0.2-SNAPSHOT</version>
                <relativePath>../../pom.xml</relativePath>
        </parent>
 
-       <version>5.3.1-SNAPSHOT</version>
+       <version>5.3.2-SNAPSHOT</version>
        <artifactId>org.eclipse.cdt.ui</artifactId>
        <packaging>eclipse-plugin</packaging>
 </project>
index 9897cc2..d98e855 100644 (file)
@@ -529,8 +529,6 @@ WriteOccurrenceAnnotation.label= C/C++ Write Occurrences
 DocCommentOwner.name = DocCommentOwner
 Doxygen.name = Doxygen
 
-indexedFilesDecorator.label = C/C++ Indexed Files
-
 # Hyperlinking
 cEditorHyperlinkTarget= C/C++ Editor
 cElementHyperlinkDetector= C/C++ Elements
@@ -583,7 +581,10 @@ ShiftRightAction.label= &Shift Right
 ShiftLeftAction.label= S&hift Left
 
 # Decorators
-excluded-file.name = C/C++ Files Excluded from Build
+indexedFilesDecorator.label = C/C++ Indexed Files
+indexedFilesDecorator.description = Decorates files indexed by C/C++ Indexer.
+excludedFile.name = C/C++ Files and Folders Excluded from Build
+excludedFile.description = Decorates source files and folders excluded from C/C++ build.
 
 templatesViewName= Templates
 
index 047744a..dff385c 100644 (file)
              class="org.eclipse.cdt.ui.wizards.CProjectWizard"
              finalPerspective="org.eclipse.cdt.ui.CPerspective"
              hasPages="true"
-             icon="icons/elcl16/newmngcc_app.gif"
+             icon="icons/elcl16/newmngc_app.gif"
              id="org.eclipse.cdt.ui.wizards.NewCWizard2"
              name="%Cproject"
              project="true">
             label="%indexedFilesDecorator.label"
             lightweight="true"
             state="false">
+         <description>%indexedFilesDecorator.description</description>
          <enablement>
             <or>
                <objectClass name="org.eclipse.cdt.core.model.ITranslationUnit"/>
             </or>
          </enablement>
       </decorator>
+      <decorator
+            adaptable="true"
+            class="org.eclipse.cdt.internal.ui.viewsupport.ExcludedFileDecorator"
+            id="org.eclipse.cdt.managedbuilder.ui.excludedFile"
+            label="%excludedFile.name"
+            lightweight="true"
+            state="true">
+         <description>%excludedFile.description</description>
+         <enablement>
+            <or>
+               <objectClass name="org.eclipse.core.resources.IFile" />
+               <objectClass name="org.eclipse.core.resources.IFolder" />
+            </or>
+         </enablement>
+      </decorator>
    </extension>
 
    <!-- Hyperlinking support -->
          </complexArray>
       </processType>
    </extension>
-       <extension point="org.eclipse.ui.decorators">
-               <decorator adaptable="true"
-                       class="org.eclipse.cdt.internal.ui.viewsupport.ExcludedFileDecorator"
-                       id="org.eclipse.cdt.managedbuilder.ui.excludedFile" label="%excluded-file.name"
-                       lightweight="true" state="true">
-                       <enablement>
-                               <objectClass name="org.eclipse.core.resources.IFile" />
-                       </enablement>
-               </decorator>
-       </extension>
  <extension
        point="org.eclipse.ui.commands">
     <command
index 990089e..9672a1c 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -335,11 +335,14 @@ public class BaseCElementContentProvider implements ITreeContentProvider {
                }
                Object parent = null;
                if (element instanceof ICElement) {
-                       if (element instanceof ICContainer && !CCorePlugin.showSourceRootsAtTopOfProject()) {
-                               parent = ((ICContainer) element).getResource().getParent();
+                       if (element instanceof ISourceRoot && !CCorePlugin.showSourceRootsAtTopOfProject()) {
+                               parent = ((ICElement) element).getResource().getParent();
+                               if (parent instanceof IProject) {
+                                       return ((ICElement) element).getCProject();
+                               }
                        }
                        else
-                       parent = ((ICElement)element).getParent();
+                               parent = ((ICElement)element).getParent();
                        // translate working copy parent to original TU,
                        // because working copies are never returned by getChildren
                        // this is necessary for proper show-in-target support
index 59e228e..a0554ce 100644 (file)
@@ -23,12 +23,19 @@ import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.texteditor.ITextEditor;
 
 import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.dom.ast.DOMException;
+import org.eclipse.cdt.core.dom.ast.EScopeKind;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionCallExpression;
+import org.eclipse.cdt.core.dom.ast.IASTImplicitName;
 import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
 import org.eclipse.cdt.core.dom.ast.IBinding;
 import org.eclipse.cdt.core.dom.ast.IEnumerator;
 import org.eclipse.cdt.core.dom.ast.IFunction;
+import org.eclipse.cdt.core.dom.ast.IScope;
 import org.eclipse.cdt.core.dom.ast.IVariable;
 import org.eclipse.cdt.core.dom.ast.c.ICExternalBinding;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionCallExpression;
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization;
 import org.eclipse.cdt.core.index.IIndex;
 import org.eclipse.cdt.core.index.IIndexManager;
@@ -36,7 +43,6 @@ import org.eclipse.cdt.core.index.IIndexName;
 import org.eclipse.cdt.core.model.ICElement;
 import org.eclipse.cdt.core.model.ICProject;
 import org.eclipse.cdt.core.model.ITranslationUnit;
-import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels;
 import org.eclipse.cdt.ui.CUIPlugin;
 
 import org.eclipse.cdt.internal.core.model.ext.ICElementHandle;
@@ -45,6 +51,7 @@ import org.eclipse.cdt.internal.corext.util.CModelUtil;
 import org.eclipse.cdt.internal.ui.actions.OpenActionUtil;
 import org.eclipse.cdt.internal.ui.util.ExceptionHandler;
 import org.eclipse.cdt.internal.ui.util.StatusLineHandler;
+import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels;
 import org.eclipse.cdt.internal.ui.viewsupport.IndexUI;
 
 public class CallHierarchyUI {
@@ -158,6 +165,19 @@ public class CallHierarchyUI {
                                IASTName name= IndexUI.getSelectedName(editorInput, sel);
                                if (name != null) {
                                        IBinding binding= name.resolveBinding();
+                                       if (!CallHierarchyUI.isRelevantForCallHierarchy(binding)) {
+                                               for (IASTNode parent= name; parent != null; parent= parent.getParent()) {
+                                                       if (parent.getPropertyInParent() == IASTFunctionCallExpression.FUNCTION_NAME) {
+                                                               ICPPASTFunctionCallExpression fcall= (ICPPASTFunctionCallExpression) parent.getParent();
+                                                               if (fcall != null) {
+                                                                       IASTImplicitName[] implicit = fcall.getImplicitNames();
+                                                                       if (implicit.length > 0)
+                                                                               binding= implicit[0].resolveBinding();
+                                                               }
+                                                               break;
+                                                       }
+                                               }
+                                       }
                                        if (CallHierarchyUI.isRelevantForCallHierarchy(binding)) {
                                                if (name.isDefinition()) {
                                                        ICElement elem= IndexUI.getCElementForName(project, index, name);
@@ -273,8 +293,16 @@ public class CallHierarchyUI {
        public static boolean isRelevantForCallHierarchy(IBinding binding) {
                if (binding instanceof ICExternalBinding ||
                                binding instanceof IEnumerator ||
-                               binding instanceof IFunction ||
-                               binding instanceof IVariable) {
+                               binding instanceof IFunction)
+                       return true;
+               
+               if (binding instanceof IVariable) {
+                       try {
+                               final IScope scope = binding.getScope();
+                               if (scope != null && scope.getKind() == EScopeKind.eLocal)
+                                       return false;
+                       } catch (DOMException e) {
+                       }
                        return true;
                }
                return false;
index dfa1e64..312e5e2 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2011 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -457,13 +457,13 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent
        }
 
        protected ProblemTreeViewer createTreeViewer(Composite parent) {
-               fTreeViewer = new OutlineTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
-               fTreeViewer.setContentProvider(createContentProvider(fTreeViewer));
-               fTreeViewer.setLabelProvider(new DecoratingCLabelProvider(createLabelProvider(), true));
-               fTreeViewer.setAutoExpandLevel(3);
-               fTreeViewer.setUseHashlookup(true);
-               fTreeViewer.addSelectionChangedListener(this);
-               return fTreeViewer;
+               ProblemTreeViewer treeViewer = new OutlineTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+               treeViewer.setContentProvider(createContentProvider(treeViewer));
+               treeViewer.setLabelProvider(new DecoratingCLabelProvider(createLabelProvider(), true));
+               treeViewer.setAutoExpandLevel(3);
+               treeViewer.setUseHashlookup(true);
+               treeViewer.addSelectionChangedListener(this);
+               return treeViewer;
        }
 
        private CUILabelProvider createLabelProvider() {
index ac350b3..5a3c8a1 100644 (file)
@@ -1229,7 +1229,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
                        if (IndexerPreferences.KEY_INDEX_ON_OPEN.equals(event.getKey())) {
                                ICElement element= getInputCElement();
                                ITranslationUnit tu = element != null ? (ITranslationUnit) element : null;
-                               updateIndexInclusion(tu, false);
+                               updateIndexInclusion(tu);
                        }
                }
 
@@ -1400,7 +1400,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
        /** The translation unit that was added by the editor to index, or <code>null</code>. */
        private ITranslationUnit fTuAddedToIndex;
 
-       private IndexerPreferenceListener fIndexerPreferenceListener;
+       private final IndexerPreferenceListener fIndexerPreferenceListener;
 
        private static final Set<String> angularIntroducers = new HashSet<String>();
        static {
@@ -1510,32 +1510,25 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
 
                if (element instanceof ITranslationUnit) {
                        ITranslationUnit tu = (ITranslationUnit) element;
-                       updateIndexInclusion(tu, false);
+                       updateIndexInclusion(tu);
                        fBracketMatcher.configure(tu.getLanguage());
                } else {
-                       updateIndexInclusion(null, false);
+                       updateIndexInclusion(null);
                        fBracketMatcher.configure(null);
                }
        }
 
-       private void updateIndexInclusion(ITranslationUnit tu, boolean synchronous) {
-               if (tu!= null) {
+       private void updateIndexInclusion(ITranslationUnit tu) {
+               if (tu != null) {
                        IProject project = tu.getCProject().getProject();
                        if (!String.valueOf(true).equals(IndexerPreferences.get(project, IndexerPreferences.KEY_INDEX_ON_OPEN, null))) {
                                tu = null;
                        }
                }
-               if (tu != null || fTuAddedToIndex != null) {
+               if ((tu != null || fTuAddedToIndex != null) && tu != fTuAddedToIndex) {
                        IndexUpdateRequestorJob job = new IndexUpdateRequestorJob(tu, fTuAddedToIndex);
                        fTuAddedToIndex = tu;
                        job.schedule();
-                       if (synchronous) {
-                               try {
-                                       job.join();
-                               } catch (InterruptedException e) {
-                                       // Ignore.
-                               }
-                       }
                }
        }
 
@@ -2200,7 +2193,8 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
      */
     @Override
        public void dispose() {
-       updateIndexInclusion(null, true);
+               fIndexerPreferenceListener.unregister();
+       updateIndexInclusion(null);
 
                ISourceViewer sourceViewer = getSourceViewer();
                if (sourceViewer instanceof ITextViewerExtension)
index 6f4a8b5..588d3f1 100644 (file)
@@ -45,7 +45,7 @@ public class SemanticHighlightingManager implements IPropertyChangeListener {
        /**
         * Highlighting style.
         */
-       static class HighlightingStyle {
+       public static class HighlightingStyle {
 
                /** Text attribute */
                private TextAttribute fTextAttribute;
@@ -94,7 +94,7 @@ public class SemanticHighlightingManager implements IPropertyChangeListener {
        /**
         * Highlighted Positions.
         */
-       static class HighlightedPosition extends Position {
+       public static class HighlightedPosition extends Position {
 
                /** Highlighting of the position */
                private HighlightingStyle fStyle;
@@ -260,30 +260,30 @@ public class SemanticHighlightingManager implements IPropertyChangeListener {
        }
 
        /** Semantic highlighting presenter */
-       private SemanticHighlightingPresenter fPresenter;
+       protected SemanticHighlightingPresenter fPresenter;
        /** Semantic highlighting reconciler */
        private SemanticHighlightingReconciler fReconciler;
 
        /** Semantic highlightings */
-       private SemanticHighlighting[] fSemanticHighlightings;
+       protected SemanticHighlighting[] fSemanticHighlightings;
        /** Highlightings */
-       private HighlightingStyle[] fHighlightings;
+       protected HighlightingStyle[] fHighlightings;
 
        /** The editor */
        private CEditor fEditor;
        /** The source viewer */
-       private CSourceViewer fSourceViewer;
+       protected CSourceViewer fSourceViewer;
        /** The color manager */
-       private IColorManager fColorManager;
+       protected IColorManager fColorManager;
        /** The preference store */
-       private IPreferenceStore fPreferenceStore;
+       protected IPreferenceStore fPreferenceStore;
        /** The source viewer configuration */
-       private CSourceViewerConfiguration fConfiguration;
+       protected CSourceViewerConfiguration fConfiguration;
        /** The presentation reconciler */
-       private CPresentationReconciler fPresentationReconciler;
+       protected CPresentationReconciler fPresentationReconciler;
 
        /** The hard-coded ranges */
-       private HighlightedRange[][] fHardcodedRanges;
+       protected HighlightedRange[][] fHardcodedRanges;
 
        /**
         * Install the semantic highlighting on the given editor infrastructure
@@ -347,7 +347,7 @@ public class SemanticHighlightingManager implements IPropertyChangeListener {
         *
         * @return the hard-coded positions
         */
-       private HighlightedPosition[] createHardcodedPositions() {
+       protected HighlightedPosition[] createHardcodedPositions() {
                List<HighlightedPosition> positions= new ArrayList<HighlightedPosition>();
                for (int i= 0; i < fHardcodedRanges.length; i++) {
                        HighlightedRange range= null;
@@ -421,14 +421,14 @@ public class SemanticHighlightingManager implements IPropertyChangeListener {
        /**
         * @return <code>true</code> iff semantic highlighting is enabled in the preferences
         */
-       private boolean isEnabled() {
+       protected boolean isEnabled() {
                return SemanticHighlightings.isEnabled(fPreferenceStore);
        }
 
        /**
         * Initialize semantic highlightings.
         */
-       private void initializeHighlightings() {
+       protected void initializeHighlightings() {
                fSemanticHighlightings= SemanticHighlightings.getSemanticHighlightings();
                fHighlightings= new HighlightingStyle[fSemanticHighlightings.length];
 
@@ -461,7 +461,7 @@ public class SemanticHighlightingManager implements IPropertyChangeListener {
        /**
         * Dispose the semantic highlightings.
         */
-       private void disposeHighlightings() {
+       protected void disposeHighlightings() {
                for (int i= 0, n= fSemanticHighlightings.length; i < n; i++)
                        removeColor(SemanticHighlightings.getColorPreferenceKey(fSemanticHighlightings[i]));
 
@@ -480,10 +480,11 @@ public class SemanticHighlightingManager implements IPropertyChangeListener {
         * Handle the given property change event
         *
         * @param event The event
+        * @return 
         */
-       private void handlePropertyChangeEvent(PropertyChangeEvent event) {
+       protected boolean handlePropertyChangeEvent(PropertyChangeEvent event) {
                if (fPreferenceStore == null)
-                       return; // Uninstalled during event notification
+                       return false; // Uninstalled during event notification
 
                if (fConfiguration != null)
                        fConfiguration.handlePropertyChangeEvent(event);
@@ -496,7 +497,7 @@ public class SemanticHighlightingManager implements IPropertyChangeListener {
                }
 
                if (!isEnabled())
-                       return;
+                       return false;
                
                boolean refreshNeeded= false;
 
@@ -554,6 +555,8 @@ public class SemanticHighlightingManager implements IPropertyChangeListener {
                
                if (refreshNeeded && fReconciler != null)
                        fReconciler.refresh();
+               
+               return refreshNeeded;
        }
 
        private void adaptToEnablementChange(HighlightingStyle highlighting, PropertyChangeEvent event) {
index 14c0ff1..63b417d 100644 (file)
@@ -287,18 +287,18 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
        /** The C editor this semantic highlighting reconciler is installed on */
        private CEditor fEditor;
        /** The semantic highlighting presenter */
-       private SemanticHighlightingPresenter fPresenter;
+       protected SemanticHighlightingPresenter fPresenter;
        /** Semantic highlightings */
-       private SemanticHighlighting[] fSemanticHighlightings;
+       protected SemanticHighlighting[] fSemanticHighlightings;
        /** Highlightings */
        private HighlightingStyle[] fHighlightings;
 
        /** Background job's added highlighted positions */
-       private List<HighlightedPosition> fAddedPositions= new ArrayList<HighlightedPosition>();
+       protected List<HighlightedPosition> fAddedPositions= new ArrayList<HighlightedPosition>();
        /** Background job's removed highlighted positions */
-       private List<HighlightedPosition> fRemovedPositions= new ArrayList<HighlightedPosition>();
+       protected List<HighlightedPosition> fRemovedPositions= new ArrayList<HighlightedPosition>();
        /** Number of removed positions */
-       private int fNOfRemovedPositions;
+       protected int fNOfRemovedPositions;
 
        /** Background job */
        private Job fJob;
@@ -313,9 +313,9 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
        private boolean fIsReconciling= false;
 
        /** The semantic highlighting presenter - cache for background thread, only valid during {@link #reconciled(IASTTranslationUnit, boolean, IProgressMonitor)} */
-       private SemanticHighlightingPresenter fJobPresenter;
+       protected SemanticHighlightingPresenter fJobPresenter;
        /** Semantic highlightings - cache for background thread, only valid during {@link #reconciled(IASTTranslationUnit, boolean, IProgressMonitor)} */
-       private SemanticHighlighting[] fJobSemanticHighlightings;
+       protected SemanticHighlighting[] fJobSemanticHighlightings;
        /** Highlightings - cache for background thread, only valid during {@link #reconciled(IASTTranslationUnit, boolean, IProgressMonitor)} */
        private HighlightingStyle[] fJobHighlightings;
 
@@ -387,7 +387,7 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
        /**
         * Start reconciling positions.
         */
-       private void startReconcilingPositions() {
+       protected void startReconcilingPositions() {
                fJobPresenter.addAllPositions(fRemovedPositions);
                fNOfRemovedPositions= fRemovedPositions.size();
        }
@@ -449,7 +449,7 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
        /**
         * Stop reconciling positions.
         */
-       private void stopReconcilingPositions() {
+       protected void stopReconcilingPositions() {
                fRemovedPositions.clear();
                fNOfRemovedPositions= 0;
                fAddedPositions.clear();
index 104a1c6..cab1a4f 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2010 IBM Corporation and others.
+ *  Copyright (c) 2005, 2011 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -29,6 +29,7 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Link;
@@ -45,6 +46,7 @@ import org.eclipse.cdt.utils.ui.controls.ControlFactory;
 import org.eclipse.cdt.internal.ui.ICHelpContextIds;
 import org.eclipse.cdt.internal.ui.editor.CEditor;
 import org.eclipse.cdt.internal.ui.preferences.OverlayPreferenceStore.OverlayKey;
+import org.eclipse.cdt.internal.ui.text.c.hover.SourceViewerInformationControl;
 import org.eclipse.cdt.internal.ui.text.contentassist.ContentAssistPreference;
 import org.eclipse.cdt.internal.ui.text.doctools.DocCommentOwnerManager;
 
@@ -329,7 +331,10 @@ public class CEditorPreferencePage extends AbstractPreferencePage {
         */
        private void initializeDefaultColors() {
                if (getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT)) {
-                       RGB rgb= fAppearanceColorList.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB();
+                       Display display= fAppearanceColorList.getDisplay();
+                       RGB rgb= SourceViewerInformationControl.getVisibleBackgroundColor(display);
+                       if (rgb == null)
+                               rgb= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB();
                        PreferenceConverter.setValue(getPreferenceStore(), PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR, rgb);
                }
        }
index 27409aa..18e0fda 100644 (file)
@@ -62,7 +62,6 @@ import org.eclipse.cdt.internal.ui.util.SWTUtil;
  * for displaying/editing CDT file type associations
  */
 public class CFileTypesPreferenceBlock {
-
        private static final int        COL_PATTERN             = 0;
        private static final int        COL_DESCRIPTION = 1;
        private static final int        COL_STATUS      = 2;
@@ -167,7 +166,6 @@ public class CFileTypesPreferenceBlock {
                public String getText(Object element) {
                        return getColumnText(element, 0);
                }
-
        }
 
        public CFileTypesPreferenceBlock() {
@@ -400,9 +398,9 @@ public class CFileTypesPreferenceBlock {
 
        public IContentType[] getRegistedContentTypes() {
                if (fContentTypes == null) {
-                       String [] ids = CoreModel.getRegistedContentTypeIds();
+                       String[] ids = CoreModel.getRegistedContentTypeIds();
                        IContentTypeManager manager = Platform.getContentTypeManager();
-                       IContentType [] ctypes = new IContentType[ids.length];
+                       IContentType[] ctypes = new IContentType[ids.length];
                        for (int i = 0; i < ids.length; i++) {
                                ctypes[i] = manager.getContentType(ids[i]);
                        }
@@ -502,8 +500,7 @@ public class CFileTypesPreferenceBlock {
                IContentTypeSettings settings;
                if (fInput == null) {
                        settings= assoc.getContentType();
-               }
-               else {
+               } else {
                        try {
                                settings= assoc.getContentType().getSettings(new ProjectScope(fInput));
                        } catch (CoreException e) {
index 0abfcc2..5021dcb 100644 (file)
@@ -11,8 +11,6 @@
  *******************************************************************************/
 package org.eclipse.cdt.internal.ui.preferences;
 
-
-
 import org.eclipse.cdt.internal.ui.ICHelpContextIds;
 import org.eclipse.jface.preference.PreferencePage;
 import org.eclipse.swt.SWT;
@@ -29,7 +27,6 @@ import org.eclipse.ui.PlatformUI;
  * type associations for the workspace
  */
 public class CFileTypesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
-
        private CFileTypesPreferenceBlock fPrefsBlock;
 
        public CFileTypesPreferencePage() {
@@ -72,11 +69,9 @@ public class CFileTypesPreferencePage extends PreferencePage implements IWorkben
         */
        @Override
        public boolean performOk() {
-               
                if (fPrefsBlock.performOk()) {
                }
                
                return super.performOk();
        }
-
 }
index f0f168e..f31d476 100644 (file)
@@ -405,7 +405,7 @@ public class NameStyleBlock extends OptionsConfigurationBlock {
        @Override
        protected void validateSettings(Key changedKey, String oldValue, String newValue) {
                StatusInfo status = new StatusInfo();
-               if (selectedCategory != null) {
+               if (selectedCategory != null && changedKey != null) {
                        NameValidator validator = selectedCategory.getNameValidator();
                        if (changedKey.equals(selectedCategory.getPrefixKey()) ||
                                        changedKey.equals(selectedCategory.getAlternativePrefixKey())) {
index 2e81f37..545b93a 100644 (file)
@@ -57,14 +57,16 @@ public class RefactoringExecutionHelper {
        private final int fSaveMode;
 
        private class Operation implements IWorkspaceRunnable {
-               public Change fChange;
-               public PerformChangeOperation fPerformChangeOperation;
-               private final boolean fForked;
-               private final boolean fForkChangeExecution;
+               Change fChange;
+               PerformChangeOperation fPerformChangeOperation;
+               final boolean fForked;
+               final boolean fForkChangeExecution;
+               final boolean fCancelable;
 
-               public Operation(boolean forked, boolean forkChangeExecution) {
+               public Operation(boolean forked, boolean forkChangeExecution, boolean cancelable) {
                        fForked= forked;
                        fForkChangeExecution= forkChangeExecution;
+                       this.fCancelable = cancelable;
         }
 
                public void run(IProgressMonitor pm) throws CoreException {
@@ -72,7 +74,8 @@ public class RefactoringExecutionHelper {
                                pm.beginTask("", fForked && !fForkChangeExecution ? 7 : 11); //$NON-NLS-1$
                                pm.subTask(""); //$NON-NLS-1$
 
-                               final RefactoringStatus status= fRefactoring.checkAllConditions(new SubProgressMonitor(pm, 4, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
+                               final RefactoringStatus status= fRefactoring.checkAllConditions(
+                                               new SubProgressMonitor(pm, 4, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
                                if (status.getSeverity() >= fStopSeverity) {
                                        final boolean[] canceled= { false };
                                        if (fForked) {
@@ -92,10 +95,7 @@ public class RefactoringExecutionHelper {
                                fChange= fRefactoring.createChange(new SubProgressMonitor(pm, 2, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
                                fChange.initializeValidationData(new SubProgressMonitor(pm, 1, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
 
-                               fPerformChangeOperation= new PerformChangeOperation(fChange);//RefactoringUI.createUIAwareChangeOperation(fChange);
-                               fPerformChangeOperation.setUndoManager(RefactoringCore.getUndoManager(), fRefactoring.getName());
-                               if (fRefactoring instanceof IScheduledRefactoring)
-                                       fPerformChangeOperation.setSchedulingRule(((IScheduledRefactoring) fRefactoring).getSchedulingRule());
+                               fPerformChangeOperation = createPerformChangeOperation(fChange);
 
                                if (!fForked || fForkChangeExecution)
                                        fPerformChangeOperation.run(new SubProgressMonitor(pm, 4, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK));
@@ -157,15 +157,31 @@ public class RefactoringExecutionHelper {
         * @throws InterruptedException thrown when the operation is canceled
         * @throws InvocationTargetException thrown when the operation failed to execute
         */
-       public void perform(boolean fork, boolean forkChangeExecution, boolean cancelable) throws InterruptedException, InvocationTargetException {
+       public void perform(boolean fork, boolean forkChangeExecution, boolean cancelable)
+                       throws InterruptedException, InvocationTargetException {
+               Operation operation = new Operation(fork, forkChangeExecution, cancelable);
+               performOperation(operation, null, fork);
+       }
+
+       public void performChange(Change change, boolean fork)
+                       throws InterruptedException, InvocationTargetException {
+               PerformChangeOperation operation = createPerformChangeOperation(change);
+               performOperation(null, operation, fork);
+       }
+
+       /**
+        * Executes either a complete refactoring operation or a change operation. 
+        * @param operation The refactoring operation. Can be <code>null</code>.
+        * @param changeOperation The change operation. Has to be <code>null</code> if {@code operation}
+        *     is not <code>null</code> and not <code>null</code> otherwise.
+        * @param fork If set, the execution will be forked.
+        */
+       private void performOperation(Operation operation, PerformChangeOperation changeOperation, boolean fork)
+                       throws InterruptedException, InvocationTargetException {
+               Assert.isTrue((operation == null) != (changeOperation == null));
                Assert.isTrue(Display.getCurrent() != null);
                final IJobManager manager= Job.getJobManager();
-               final ISchedulingRule rule;
-               if (fRefactoring instanceof IScheduledRefactoring) {
-                       rule= ((IScheduledRefactoring) fRefactoring).getSchedulingRule();
-               } else {
-                       rule= ResourcesPlugin.getWorkspace().getRoot();
-               }
+               final ISchedulingRule rule = getSchedulingRule();
                try {
                        try {
                                Runnable r= new Runnable() {
@@ -179,17 +195,22 @@ public class RefactoringExecutionHelper {
                        }
 
                        RefactoringSaveHelper saveHelper= new RefactoringSaveHelper(fSaveMode);
-                       if (!saveHelper.saveEditors(fParent))
-                               throw new InterruptedException();
-                       final Operation op= new Operation(fork, forkChangeExecution);
+                       if (operation != null) {
+                               if (!saveHelper.saveEditors(fParent))
+                                       throw new InterruptedException();
+                       }
                        fRefactoring.setValidationContext(fParent);
                        try {
-                               fExecContext.run(fork, cancelable, new WorkbenchRunnableAdapter(op, rule, true));
-                               if (fork && !forkChangeExecution && op.fPerformChangeOperation != null)
-                                       fExecContext.run(false, false, new WorkbenchRunnableAdapter(op.fPerformChangeOperation, rule, true));
-
-                               if (op.fPerformChangeOperation != null) {
-                                       RefactoringStatus validationStatus= op.fPerformChangeOperation.getValidationStatus();
+                               if (operation != null) {
+                                       fExecContext.run(fork, operation.fCancelable, new WorkbenchRunnableAdapter(operation, rule, true));
+                                       changeOperation = operation.fPerformChangeOperation;
+                                       fork = fork && !operation.fForkChangeExecution;
+                               }
+       
+                               if (changeOperation != null) {
+                                       if (fork)
+                                               fExecContext.run(false, false, new WorkbenchRunnableAdapter(changeOperation, rule, true));
+                                       RefactoringStatus validationStatus= changeOperation.getValidationStatus();
                                        if (validationStatus != null && validationStatus.hasFatalError()) {
                                                MessageDialog.openError(fParent, fRefactoring.getName(),
                                                                NLS.bind(Messages.RefactoringExecutionHelper_cannot_execute,
@@ -198,14 +219,13 @@ public class RefactoringExecutionHelper {
                                        }
                                }
                        } catch (InvocationTargetException e) {
-                               PerformChangeOperation pco= op.fPerformChangeOperation;
-                               if (pco != null && pco.changeExecutionFailed()) {
+                               if (changeOperation != null && changeOperation.changeExecutionFailed()) {
                                        ChangeExceptionHandler handler= new ChangeExceptionHandler(fParent, fRefactoring);
                                        Throwable inner= e.getTargetException();
                                        if (inner instanceof RuntimeException) {
-                                               handler.handle(pco.getChange(), (RuntimeException)inner);
+                                               handler.handle(changeOperation.getChange(), (RuntimeException)inner);
                                        } else if (inner instanceof CoreException) {
-                                               handler.handle(pco.getChange(), (CoreException)inner);
+                                               handler.handle(changeOperation.getChange(), (CoreException)inner);
                                        } else {
                                                throw e;
                                        }
@@ -222,4 +242,20 @@ public class RefactoringExecutionHelper {
                        fRefactoring.setValidationContext(null);
                }
        }
+
+       private ISchedulingRule getSchedulingRule() {
+               if (fRefactoring instanceof IScheduledRefactoring) {
+                       return ((IScheduledRefactoring) fRefactoring).getSchedulingRule();
+               } else {
+                       return ResourcesPlugin.getWorkspace().getRoot();
+               }
+       }
+
+       private PerformChangeOperation createPerformChangeOperation(Change change) {
+               PerformChangeOperation operation = new PerformChangeOperation(change);
+               operation.setUndoManager(RefactoringCore.getUndoManager(), fRefactoring.getName());
+               if (fRefactoring instanceof IScheduledRefactoring)
+                       operation.setSchedulingRule(((IScheduledRefactoring) fRefactoring).getSchedulingRule());
+               return operation;
+       }
 }
index 650042f..e53a3e7 100644 (file)
@@ -885,7 +885,7 @@ public class ExtractFunctionRefactoring extends CRefactoring {
                arguments.put(CRefactoringDescription.SELECTION, region.getOffset() + "," + region.getLength()); //$NON-NLS-1$
                arguments.put(ExtractFunctionRefactoringDescription.NAME, info.getMethodName());
                arguments.put(ExtractFunctionRefactoringDescription.VISIBILITY, info.getVisibility().toString());
-               arguments.put(ExtractFunctionRefactoringDescription.REPLACE_DUBLICATES, Boolean.toString(info.isReplaceDuplicates()));
+               arguments.put(ExtractFunctionRefactoringDescription.REPLACE_DUPLICATES, Boolean.toString(info.isReplaceDuplicates()));
                return arguments;
        }
 }
index ab64145..4a9f4da 100644 (file)
@@ -32,7 +32,7 @@ import org.eclipse.cdt.internal.ui.refactoring.utils.VisibilityEnum;
 public class ExtractFunctionRefactoringDescription extends CRefactoringDescription {
        protected static final String NAME = "name"; //$NON-NLS-1$
        protected static final String VISIBILITY = "visibility"; //$NON-NLS-1$
-       protected static final String REPLACE_DUBLICATES = "replaceDuplicates"; //$NON-NLS-1$
+       protected static final String REPLACE_DUPLICATES = "replaceDuplicates"; //$NON-NLS-1$
 
        public ExtractFunctionRefactoringDescription(String project, String description,
                        String comment, Map<String, String> arguments) {
@@ -47,7 +47,7 @@ public class ExtractFunctionRefactoringDescription extends CRefactoringDescripti
                
                info.setMethodName(arguments.get(NAME));
                info.setVisibility(VisibilityEnum.getEnumForStringRepresentation(arguments.get(VISIBILITY)));
-               info.setReplaceDuplicates(Boolean.parseBoolean(arguments.get(REPLACE_DUBLICATES)));
+               info.setReplaceDuplicates(Boolean.parseBoolean(arguments.get(REPLACE_DUPLICATES)));
                
                proj = getCProject();
                file = getFile();
diff --git a/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/AccessorDescriptor.java b/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/AccessorDescriptor.java
new file mode 100644 (file)
index 0000000..78e66f2
--- /dev/null
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Google, Inc and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *        Sergey Prigogin (Google) - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.cdt.internal.ui.refactoring.gettersandsetters;
+
+import com.ibm.icu.text.Collator;
+
+import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTNode.CopyStyle;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
+
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTQualifiedName;
+
+public class AccessorDescriptor implements Comparable<AccessorDescriptor> {
+       public enum AccessorKind {
+               GETTER,
+               SETTER;
+       }
+
+       private static final Collator collator = Collator.getInstance();
+
+       private final AccessorKind kind;
+       private final String accessorName;
+       private final IASTName fieldName;
+       private AccessorFactory accessorFactory;
+       private IASTSimpleDeclaration accessorDeclaration;
+       private IASTSimpleDeclaration existingAccessorDeclaration;
+       private IASTFunctionDefinition existingAccessorDefinition;
+
+       public AccessorDescriptor(AccessorKind kind, String accessorName, FieldDescriptor fieldDescriptor) {
+               GetterSetterContext context = fieldDescriptor.getContext();
+               this.kind = kind;
+               this.accessorName = accessorName;
+               this.fieldName = fieldDescriptor.getFieldName();
+               if (accessorName != null) {
+                       this.accessorFactory = AccessorFactory.createFactory(kind, fieldName,
+                                               fieldDescriptor.getFieldDeclaration(), accessorName);
+                       this.accessorDeclaration = accessorFactory.createDeclaration();
+       
+                       for (IASTFunctionDefinition currentDefinition : context.existingFunctionDefinitions) {
+                               if (currentDefinition.getDeclarator().getName().toString().equals(accessorName)) {
+                                       existingAccessorDefinition = currentDefinition;
+                               }
+                       }
+                       for (IASTSimpleDeclaration currentDeclaration : context.existingFunctionDeclarations) {
+                               if (GetterSetterContext.getDeclarationName(currentDeclaration).toString().equals(accessorName)) {
+                                       existingAccessorDeclaration = currentDeclaration;
+                               }
+                       }
+               }
+       }
+
+       boolean canBeGenerated() {
+               return accessorName != null && existingAccessorDeclaration == null && existingAccessorDefinition == null;
+       }
+
+       public AccessorKind getKind() {
+               return kind;
+       }
+
+       public IASTName getFieldName() {
+               return fieldName;
+       }
+
+       public int compareTo(AccessorDescriptor other) {
+               int c = collator.compare(fieldName.toString(), other.fieldName.toString());
+               if (c != 0)
+                       return c;
+               return kind.ordinal() - other.kind.ordinal();
+       }
+
+       @Override
+       public boolean equals(Object obj) {
+               if (!(obj instanceof AccessorDescriptor))
+                       return false;
+               AccessorDescriptor other = (AccessorDescriptor) obj;
+               return fieldName == other.fieldName && kind == other.kind;
+       }
+
+       @Override
+       public String toString() {
+               return accessorName;
+       }
+
+       public IASTSimpleDeclaration getAccessorDeclaration() {
+               return accessorDeclaration;
+       }
+
+       public IASTFunctionDefinition getAccessorDefinition(boolean qualifedName) {
+               ICPPASTQualifiedName qname;
+               if (qualifedName) {
+                       qname = getClassName();
+               } else {
+                       qname = null;
+               }
+               
+               return accessorFactory.createDefinition(qname);
+       }
+
+       private ICPPASTQualifiedName getClassName() {
+               IASTNode node = fieldName.getParent();
+               while (!(node instanceof IASTCompositeTypeSpecifier)) {
+                       node = node.getParent();
+               }
+               IASTCompositeTypeSpecifier comp = (IASTCompositeTypeSpecifier) node;
+               
+               CPPASTQualifiedName qname = new CPPASTQualifiedName();
+               qname.addName(comp.getName().copy(CopyStyle.withLocations));
+               return qname;
+       }
+}
diff --git a/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/AccessorFactory.java b/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/AccessorFactory.java
new file mode 100644 (file)
index 0000000..9436a4c
--- /dev/null
@@ -0,0 +1,274 @@
+/*******************************************************************************
+ * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik  
+ * Rapperswil, University of applied sciences and others
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0 
+ * which accompanies this distribution, and is available at 
+ * http://www.eclipse.org/legal/epl-v10.html
+ *  
+ * Contributors: 
+ *     Institute for Software - initial API and implementation
+ *     Sergey Prigogin (Google)
+ *******************************************************************************/
+package org.eclipse.cdt.internal.ui.refactoring.gettersandsetters;
+
+import java.util.Arrays;
+
+import org.eclipse.cdt.core.dom.ast.IASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
+import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode.CopyStyle;
+import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTArrayDeclarator;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
+import org.eclipse.cdt.core.parser.Keywords;
+
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.c.CASTPointer;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTBinaryExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompoundStatement;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTExpressionStatement;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFieldReference;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDefinition;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTIdExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTParameterDeclaration;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTPointer;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTReferenceOperator;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTReturnStatement;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclSpecifier;
+import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclaration;
+
+import org.eclipse.cdt.internal.ui.refactoring.gettersandsetters.AccessorDescriptor.AccessorKind;
+
+public abstract class AccessorFactory {        
+       protected final IASTName fieldName;
+       protected final IASTSimpleDeclaration fieldDeclaration;
+       protected final String accessorName;
+       protected boolean passByReference;
+
+       public static AccessorFactory createFactory(AccessorKind kind, IASTName fieldName,
+                       IASTSimpleDeclaration fieldDeclaration, String accessorName) {
+               if (kind == AccessorKind.GETTER) {
+                       return new GetterFactory(fieldName, fieldDeclaration, accessorName);
+               } else {
+                       return new SetterFactory(fieldName, fieldDeclaration, accessorName);
+               }
+       }
+
+       protected AccessorFactory(IASTName fieldName, IASTSimpleDeclaration fieldDeclaration,
+                       String accessorName) {
+               this.fieldName = fieldName;
+               this.fieldDeclaration = fieldDeclaration;
+               this.accessorName = accessorName;
+//             IType type = CPPVisitor.createType(fieldDeclaration.getDeclSpecifier());
+//             passByReference = TypeHelper.shouldBePassedByReference(type, fieldDeclaration.getTranslationUnit());
+       }
+
+       /**
+        * Creates an accessor declaration.
+        */
+       public abstract IASTSimpleDeclaration createDeclaration();
+
+       /**
+        * Creates an accessor definition.
+        * 
+        * @param className qualified name of the class containing the accessor
+        */
+       public abstract IASTFunctionDefinition createDefinition(ICPPASTQualifiedName className);
+
+       protected IASTDeclSpecifier getParamOrReturnDeclSpecifier() {
+               IASTDeclSpecifier declSpec = fieldDeclaration.getDeclSpecifier().copy(CopyStyle.withLocations);
+               if (passByReference || fieldDeclaration.getDeclarators()[0] instanceof IASTArrayDeclarator) {
+                       declSpec.setConst(true);
+               }
+               return declSpec;
+       }
+
+       private static class GetterFactory extends AccessorFactory {
+               GetterFactory(IASTName fieldName, IASTSimpleDeclaration fieldDeclaration, String getterName) {
+                       super(fieldName, fieldDeclaration, getterName);
+               }
+
+               @Override
+               public IASTSimpleDeclaration createDeclaration() {
+                       IASTSimpleDeclaration getter = new CPPASTSimpleDeclaration();
+                       getter.setDeclSpecifier(getParamOrReturnDeclSpecifier());
+                       getter.addDeclarator(getGetterDeclarator(null));
+                       return getter;
+               }
+
+               @Override
+               public IASTFunctionDefinition createDefinition(ICPPASTQualifiedName className) {
+                       IASTFunctionDefinition getter = new CPPASTFunctionDefinition();
+                       
+                       getter.setDeclSpecifier(getParamOrReturnDeclSpecifier());
+                       IASTDeclarator getterDeclarator = getGetterDeclarator(className);
+                       // IASTFunctionDefinition expects the outermost IASTFunctionDeclarator in declarator hierarchy
+                       while (!(getterDeclarator instanceof IASTFunctionDeclarator)) {
+                               getterDeclarator = getterDeclarator.getNestedDeclarator();
+                       }
+                       getter.setDeclarator((IASTFunctionDeclarator) getterDeclarator);
+                       getter.setBody(getGetterBody());
+                       return getter;
+               }
+
+               private CPPASTCompoundStatement getGetterBody() {
+                       CPPASTCompoundStatement compound = new CPPASTCompoundStatement();
+                       CPPASTReturnStatement returnStatement = new CPPASTReturnStatement();
+                       CPPASTIdExpression idExpr = new CPPASTIdExpression();
+                       CPPASTName returnVal = new CPPASTName();
+                       returnVal.setName(fieldName.toCharArray());
+                       idExpr.setName(returnVal);
+                       returnStatement.setReturnValue(idExpr);
+                       compound.addStatement(returnStatement);
+                       return compound;
+               }
+
+               private IASTDeclarator getGetterDeclarator(ICPPASTQualifiedName qualifiedName) {
+                       CPPASTName getterName = new CPPASTName();
+                       getterName.setName(accessorName.toCharArray());
+
+                       // Copy declarator hierarchy
+                       IASTDeclarator topDeclarator = fieldDeclaration.getDeclarators()[0].copy(CopyStyle.withLocations);
+                       
+                       if (topDeclarator instanceof IASTArrayDeclarator) {
+                               boolean isCpp = topDeclarator instanceof ICPPASTArrayDeclarator;
+                               IASTDeclarator decl = isCpp ? new CPPASTDeclarator() : new CASTDeclarator();
+                               decl.setName(topDeclarator.getName());
+                               decl.setNestedDeclarator(topDeclarator.getNestedDeclarator());
+                               decl.addPointerOperator(isCpp ? new CPPASTPointer() : new CASTPointer());
+                               for (IASTPointerOperator pointer : topDeclarator.getPointerOperators()) {
+                                       decl.addPointerOperator(pointer);
+                               }
+                               topDeclarator = decl;
+                       }
+                       // Find the innermost declarator in hierarchy
+                       IASTDeclarator innermost = topDeclarator;
+                       while (innermost.getNestedDeclarator() != null) {
+                               innermost = innermost.getNestedDeclarator();
+                       }
+
+                       // Create a new innermost function declarator based on the field declarator 
+                       CPPASTFunctionDeclarator functionDeclarator = new CPPASTFunctionDeclarator();
+                       functionDeclarator.setConst(true);
+                       if (qualifiedName != null) {
+                               qualifiedName.addName(getterName);
+                               functionDeclarator.setName(qualifiedName);
+                       } else {
+                               functionDeclarator.setName(getterName);
+                       }
+                       for (IASTPointerOperator pointer : innermost.getPointerOperators()){
+                               functionDeclarator.addPointerOperator(pointer.copy(CopyStyle.withLocations));
+                       }
+                       if (passByReference) {
+                               functionDeclarator.addPointerOperator(new CPPASTReferenceOperator(false));
+                       }
+                       
+                       // Replace the innermost with functionDeclarator and return the whole declarator tree
+                       if (innermost == topDeclarator) {
+                               // No tree
+                               return functionDeclarator;
+                       } else {
+                               IASTDeclarator parent = (IASTDeclarator) innermost.getParent();
+                               parent.setNestedDeclarator(functionDeclarator);
+                               return topDeclarator;
+                       }
+               }
+       }
+
+       private static class SetterFactory extends AccessorFactory {
+               SetterFactory(IASTName fieldName, IASTSimpleDeclaration fieldDeclaration, String setterName) {
+                       super(fieldName, fieldDeclaration, setterName);
+               }
+
+               @Override
+               public IASTSimpleDeclaration createDeclaration() {
+                       IASTSimpleDeclaration setter = new CPPASTSimpleDeclaration();
+                       setter.setDeclSpecifier(getVoidDeclSpec());             
+                       setter.addDeclarator(getSetterDeclarator(null));
+                       return setter;
+               }
+
+               @Override
+               public IASTFunctionDefinition createDefinition(ICPPASTQualifiedName className) {
+                       IASTFunctionDefinition setter = new CPPASTFunctionDefinition();
+                       setter.setDeclSpecifier(getVoidDeclSpec());             
+                       setter.setDeclarator(getSetterDeclarator(className));
+                       setter.setBody(getSetterBody());
+                       return setter;
+               }
+
+               private CPPASTCompoundStatement getSetterBody() {
+                       CPPASTCompoundStatement compound = new CPPASTCompoundStatement();
+                       CPPASTExpressionStatement exprStmt = new CPPASTExpressionStatement();
+                       CPPASTBinaryExpression binExpr = new CPPASTBinaryExpression();
+                       IASTDeclarator innerDeclarator = fieldDeclaration.getDeclarators()[0];
+                       while (innerDeclarator.getNestedDeclarator() != null) {
+                               innerDeclarator = innerDeclarator.getNestedDeclarator();
+                       }
+                       IASTName fieldName = innerDeclarator.getName();
+                       CPPASTName parameterName = getSetterParameterName();
+                       if (Arrays.equals(fieldName.getSimpleID(), parameterName.getSimpleID())) {
+                               CPPASTFieldReference fieldRef = new CPPASTFieldReference();
+                               CPPASTLiteralExpression litExpr = new CPPASTLiteralExpression();
+                               litExpr.setValue(Keywords.cTHIS); 
+                               fieldRef.setFieldOwner(litExpr);
+                               fieldRef.setIsPointerDereference(true);
+                               fieldRef.setFieldName(fieldName.copy(CopyStyle.withLocations));
+                               binExpr.setOperand1(fieldRef);
+                       } else {
+                               CPPASTIdExpression idExpr = new CPPASTIdExpression(fieldName.copy(CopyStyle.withLocations));
+                               binExpr.setOperand1(idExpr);
+                       }
+                       binExpr.setOperator(IASTBinaryExpression.op_assign);
+                       CPPASTIdExpression idExpr = new CPPASTIdExpression(parameterName);
+                       binExpr.setOperand2(idExpr);
+                       exprStmt.setExpression(binExpr);
+                       compound.addStatement(exprStmt);
+                       return compound;
+               }
+
+               private CPPASTFunctionDeclarator getSetterDeclarator(ICPPASTQualifiedName qualifiedName) {
+                       CPPASTName setterName = new CPPASTName();
+                       setterName.setName(accessorName.toCharArray());
+                       CPPASTFunctionDeclarator declarator = new CPPASTFunctionDeclarator();
+                       if (qualifiedName != null) {
+                               qualifiedName.addName(setterName);
+                               declarator.setName(qualifiedName);
+                       } else {
+                               declarator.setName(setterName);
+                       }
+                       CPPASTParameterDeclaration parameterDeclaration = new CPPASTParameterDeclaration();
+                       IASTDeclarator parameterDeclarator = fieldDeclaration.getDeclarators()[0].copy(CopyStyle.withLocations);
+                       parameterDeclarator.setName(getSetterParameterName());
+                       if (passByReference) {
+                               parameterDeclarator.addPointerOperator(new CPPASTReferenceOperator(false));
+                       }
+                       parameterDeclaration.setDeclarator(parameterDeclarator);
+                       parameterDeclaration.setDeclSpecifier(getParamOrReturnDeclSpecifier());
+                       declarator.addParameterDeclaration(parameterDeclaration.copy(CopyStyle.withLocations));
+                       return declarator;
+               }
+
+               private CPPASTName getSetterParameterName() {
+                       String parameterName = GetterSetterNameGenerator.generateSetterParameterName(fieldName);
+                       return new CPPASTName(parameterName.toCharArray());
+               }
+
+               private static CPPASTSimpleDeclSpecifier getVoidDeclSpec() {
+                       CPPASTSimpleDeclSpecifier declSpecifier = new CPPASTSimpleDeclSpecifier();
+                       declSpecifier.setType(IASTSimpleDeclSpecifier.t_void);
+                       return declSpecifier;
+               }
+       }
+}
diff --git a/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/FieldDescriptor.java b/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/FieldDescriptor.java
new file mode 100644 (file)
index 0000000..c627a0e
--- /dev/null
@@ -0,0 +1,121 @@
+package org.eclipse.cdt.internal.ui.refactoring.gettersandsetters;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
+import org.eclipse.cdt.core.dom.ast.IASTName;
+import org.eclipse.cdt.core.dom.ast.IASTNode;
+import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
+import org.eclipse.cdt.core.dom.ast.IArrayType;
+import org.eclipse.cdt.core.dom.ast.IBinding;
+import org.eclipse.cdt.core.dom.ast.IPointerType;
+import org.eclipse.cdt.core.dom.ast.IQualifierType;
+import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPField;
+import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
+
+import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil;
+
+import org.eclipse.cdt.internal.ui.refactoring.gettersandsetters.AccessorDescriptor.AccessorKind;
+
+class FieldDescriptor {
+       private final IASTName fieldName;
+       private final IASTSimpleDeclaration fieldDeclaration;
+       private final AccessorDescriptor getter;
+       private final AccessorDescriptor setter;
+       private final AccessorDescriptor[] childNodes;
+       private final GetterSetterContext context;
+       
+       FieldDescriptor(IASTSimpleDeclaration fieldDeclaration, GetterSetterContext context) {
+               this.fieldName = GetterSetterContext.getDeclarationName(fieldDeclaration);
+               this.fieldDeclaration = fieldDeclaration;
+               this.context = context;
+               Set<String> namesToAvoid = getNamesToAvoid();
+               String name = GetterSetterNameGenerator.generateGetterName(fieldName, namesToAvoid);
+               this.getter = new AccessorDescriptor(AccessorKind.GETTER, name, this);
+               name = GetterSetterNameGenerator.generateSetterName(fieldName, namesToAvoid);
+                if (!isAssignable(fieldDeclaration))
+                        name = null;
+               this.setter = new AccessorDescriptor(AccessorKind.SETTER, name, this);
+
+               List<AccessorDescriptor> children = new ArrayList<AccessorDescriptor>(2);
+               if (getter.canBeGenerated()) {
+                       children.add(getter);
+               }
+               if (setter.canBeGenerated()) {
+                       children.add(setter);
+               }
+               childNodes = children.toArray(new AccessorDescriptor[children.size()]);
+       }
+
+       private Set<String> getNamesToAvoid() {
+               Set<String> namesToAvoid = new HashSet<String>();
+               // Add field names.
+               for (IASTSimpleDeclaration fieldDeclaration : context.existingFields) {
+                       namesToAvoid.add(String.valueOf(GetterSetterContext.getDeclarationName(fieldDeclaration).getSimpleID()));
+               }
+               // Add constructor name.
+               if (!context.existingFields.isEmpty()) {
+                       IASTNode node = context.existingFields.get(0).getParent();
+                       while (!(node instanceof IASTCompositeTypeSpecifier)) {
+                               node = node.getParent();
+                       }
+                       IASTCompositeTypeSpecifier comp = (IASTCompositeTypeSpecifier) node;
+                       namesToAvoid.add(String.valueOf(comp.getName().getLastName().getSimpleID()));
+               }
+               return namesToAvoid;
+       }
+
+       private static boolean isAssignable(IASTSimpleDeclaration declaration) {
+               IASTName name = GetterSetterContext.getDeclarationName(declaration);
+               IBinding binding = name.resolveBinding();
+               if (!(binding instanceof ICPPField))
+                       return false;
+               ICPPField field = (ICPPField) binding;
+               IType type = field.getType();
+               type = SemanticUtil.getNestedType(type, SemanticUtil.TDEF);
+               if (type instanceof IArrayType || type instanceof ICPPReferenceType)
+                       return false;
+               if (type instanceof IPointerType && ((IPointerType) type).isConst())
+                       return false;
+               if (type instanceof IQualifierType && ((IQualifierType) type).isConst())
+                       return false;
+               return true;
+       }
+
+       @Override
+       public String toString() {
+               return fieldName.toString();
+       }
+
+       AccessorDescriptor[] getChildNodes() {
+               return childNodes;
+       }
+
+       boolean missingGetterOrSetter() {
+               return getter.canBeGenerated() || setter.canBeGenerated();
+       }
+
+       public GetterSetterContext getContext() {
+               return context;
+       }
+
+       public IASTName getFieldName() {
+               return fieldName;
+       }
+
+       public IASTSimpleDeclaration getFieldDeclaration() {
+               return fieldDeclaration;
+       }
+
+       public AccessorDescriptor getGetter() {
+               return getter;
+       }
+
+       public AccessorDescriptor getSetter() {
+               return setter;
+       }
+}
diff --git a/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/FunctionFactory.java b/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/FunctionFactory.java
deleted file mode 100644 (file)
index 83fed44..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik  
- * Rapperswil, University of applied sciences and others
- * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Eclipse Public License v1.0 
- * which accompanies this distribution, and is available at 
- * http://www.eclipse.org/legal/epl-v10.html  
- *  
- * Contributors: 
- *     Institute for Software - initial API and implementation
- *     Sergey Prigogin (Google)
- *******************************************************************************/
-package org.eclipse.cdt.internal.ui.refactoring.gettersandsetters;
-
-import java.util.Arrays;
-
-import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
-import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
-import org.eclipse.cdt.core.dom.ast.IASTFunctionDeclarator;
-import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
-import org.eclipse.cdt.core.dom.ast.IASTName;
-import org.eclipse.cdt.core.dom.ast.IASTNode.CopyStyle;
-import org.eclipse.cdt.core.dom.ast.IASTPointerOperator;
-import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
-import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
-import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
-import org.eclipse.cdt.core.parser.Keywords;
-
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTBinaryExpression;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompoundStatement;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTExpressionStatement;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFieldReference;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDefinition;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTIdExpression;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTLiteralExpression;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTParameterDeclaration;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTReturnStatement;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclSpecifier;
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclaration;
-
-public class FunctionFactory {
-
-       public static IASTFunctionDefinition createGetterDefinition(IASTName fieldName,
-                       IASTSimpleDeclaration fieldDeclaration, ICPPASTQualifiedName name) {
-               IASTFunctionDefinition getter = new CPPASTFunctionDefinition();
-               
-               getter.setDeclSpecifier(fieldDeclaration.getDeclSpecifier().copy(CopyStyle.withLocations));
-               IASTDeclarator getterDeclarator = getGetterDeclarator(fieldName, fieldDeclaration, name);
-               // IASTFunctionDefinition. expects the outermost IASTFunctionDeclarator in declarator hierarchy
-               while (!(getterDeclarator instanceof IASTFunctionDeclarator)) {
-                       getterDeclarator = getterDeclarator.getNestedDeclarator();
-               }
-               getter.setDeclarator((IASTFunctionDeclarator) getterDeclarator);
-               getter.setBody(getGetterBody(fieldName));
-               return getter;
-       }
-
-       private static CPPASTCompoundStatement getGetterBody(IASTName fieldName) {
-               CPPASTCompoundStatement compound = new CPPASTCompoundStatement();
-               CPPASTReturnStatement returnStatement = new CPPASTReturnStatement();
-               CPPASTIdExpression idExpr = new CPPASTIdExpression();
-               CPPASTName returnVal = new CPPASTName();
-               returnVal.setName(fieldName.toCharArray());
-               idExpr.setName(returnVal);
-               returnStatement.setReturnValue(idExpr);
-               compound.addStatement(returnStatement);
-               return compound;
-       }
-
-       private static IASTDeclarator getGetterDeclarator(IASTName fieldName,
-                       IASTSimpleDeclaration fieldDeclaration, ICPPASTQualifiedName name) {
-               CPPASTName getterName = new CPPASTName();
-               getterName.setName(GetterSetterNameGenerator.generateGetterName(fieldName).toCharArray());
-
-               // copy declarator hierarchy
-               IASTDeclarator topDeclarator = fieldDeclaration.getDeclarators()[0].copy(CopyStyle.withLocations);
-               
-               // find the innermost declarator in hierarchy
-               IASTDeclarator innermost = topDeclarator;
-               while (innermost.getNestedDeclarator() != null) {
-                       innermost = innermost.getNestedDeclarator();
-               }
-               
-               // create a new innermost function declarator basing on the field declarator 
-               CPPASTFunctionDeclarator functionDeclarator = new CPPASTFunctionDeclarator();
-               functionDeclarator.setConst(true);
-               if (name != null) {
-                       name.addName(getterName);
-                       functionDeclarator.setName(name);
-               } else {
-                       functionDeclarator.setName(getterName);
-               }
-               for (IASTPointerOperator pointer : innermost.getPointerOperators()){
-                       functionDeclarator.addPointerOperator(pointer.copy(CopyStyle.withLocations));
-               }
-               
-               // replace innermost with functionDeclarator and return the whole declarator tree
-               if (innermost == topDeclarator) {
-                       // no tree
-                       return functionDeclarator;
-               } else {
-                       IASTDeclarator parent = (IASTDeclarator) innermost.getParent();
-                       parent.setNestedDeclarator(functionDeclarator);
-                       return topDeclarator;
-               }
-       }
-
-       public static IASTFunctionDefinition createSetterDefinition(IASTName fieldName,
-                       IASTSimpleDeclaration fieldDeclaration, ICPPASTQualifiedName name) {
-               IASTFunctionDefinition setter = new CPPASTFunctionDefinition();
-               setter.setDeclSpecifier(getVoidDeclSpec());             
-               setter.setDeclarator(getSetterDeclarator(fieldName, fieldDeclaration, name));
-               setter.setBody(getSetterBody(fieldDeclaration));
-               return setter;
-       }
-
-       private static CPPASTCompoundStatement getSetterBody(IASTSimpleDeclaration fieldDeclaration) {
-               CPPASTCompoundStatement compound = new CPPASTCompoundStatement();
-               CPPASTExpressionStatement exprStmt = new CPPASTExpressionStatement();
-               CPPASTBinaryExpression binExpr = new CPPASTBinaryExpression();
-               IASTDeclarator innerDeclarator = fieldDeclaration.getDeclarators()[0];
-               while (innerDeclarator.getNestedDeclarator() != null) {
-                       innerDeclarator = innerDeclarator.getNestedDeclarator();
-               }
-               IASTName fieldName = innerDeclarator.getName();
-               CPPASTName parameterName = getSetterParameterName(fieldName);
-               if (Arrays.equals(fieldName.getSimpleID(), parameterName.getSimpleID())) {
-                       CPPASTFieldReference fieldRef = new CPPASTFieldReference();
-                       CPPASTLiteralExpression litExpr = new CPPASTLiteralExpression();
-                       litExpr.setValue(Keywords.cTHIS); 
-                       fieldRef.setFieldOwner(litExpr);
-                       fieldRef.setIsPointerDereference(true);
-                       fieldRef.setFieldName(fieldName.copy(CopyStyle.withLocations));
-                       binExpr.setOperand1(fieldRef);
-               } else {
-                       CPPASTIdExpression idExpr = new CPPASTIdExpression(fieldName.copy(CopyStyle.withLocations));
-                       binExpr.setOperand1(idExpr);
-               }
-               binExpr.setOperator(IASTBinaryExpression.op_assign);
-               CPPASTIdExpression idExpr = new CPPASTIdExpression(parameterName);
-               binExpr.setOperand2(idExpr);
-               exprStmt.setExpression(binExpr);
-               compound.addStatement(exprStmt);
-               return compound;
-       }
-
-       private static CPPASTFunctionDeclarator getSetterDeclarator(IASTName fieldName,
-                       IASTSimpleDeclaration fieldDeclaration, ICPPASTQualifiedName name) {
-               CPPASTName setterName = new CPPASTName();
-               setterName.setName(GetterSetterNameGenerator.generateSetterName(fieldName).toCharArray());
-               CPPASTFunctionDeclarator declarator = new CPPASTFunctionDeclarator();
-               if (name != null) {
-                       name.addName(setterName);
-                       declarator.setName(name);
-               } else {
-                       declarator.setName(setterName);
-               }
-               CPPASTParameterDeclaration parameterDeclaration = new CPPASTParameterDeclaration();
-               IASTDeclarator parameterDeclarator = fieldDeclaration.getDeclarators()[0].copy(CopyStyle.withLocations);
-               parameterDeclarator.setName(getSetterParameterName(fieldName));
-               parameterDeclaration.setDeclarator(parameterDeclarator);
-               parameterDeclaration.setDeclSpecifier(fieldDeclaration.getDeclSpecifier().copy(
-                               CopyStyle.withLocations));
-               declarator.addParameterDeclaration(parameterDeclaration.copy(CopyStyle.withLocations));
-               return declarator;
-       }
-
-       private static CPPASTName getSetterParameterName(IASTName fieldName) {
-               String parameterName = GetterSetterNameGenerator.generateSetterParameterName(fieldName);
-               return new CPPASTName(parameterName.toCharArray());
-       }
-
-       private static CPPASTSimpleDeclSpecifier getVoidDeclSpec() {
-               CPPASTSimpleDeclSpecifier declSpecifier = new CPPASTSimpleDeclSpecifier();
-               declSpecifier.setType(IASTSimpleDeclSpecifier.t_void);
-               return declSpecifier;
-       }
-
-       public static IASTSimpleDeclaration createGetterDeclaration(IASTName fieldName,
-                       IASTSimpleDeclaration fieldDeclaration) {
-               IASTSimpleDeclaration getter = new CPPASTSimpleDeclaration();
-               getter.setDeclSpecifier(fieldDeclaration.getDeclSpecifier().copy(CopyStyle.withLocations));
-               getter.addDeclarator(getGetterDeclarator(fieldName, fieldDeclaration, null));
-               return getter;
-       }
-
-       public static IASTSimpleDeclaration createSetterDeclaration(IASTName fieldName,
-                       IASTSimpleDeclaration fieldDeclaration) {
-               IASTSimpleDeclaration setter = new CPPASTSimpleDeclaration();
-               setter.setDeclSpecifier(getVoidDeclSpec());             
-               setter.addDeclarator(getSetterDeclarator(fieldName, fieldDeclaration, null));
-               return setter;
-       }
-}
index 5b272b2..6da9623 100644 (file)
@@ -11,9 +11,6 @@
  *******************************************************************************/
 package org.eclipse.cdt.internal.ui.refactoring.gettersandsetters;
 
-import java.util.Set;
-import java.util.SortedSet;
-
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent;
@@ -36,8 +33,7 @@ import org.eclipse.ui.dialogs.PreferencesUtil;
 import org.eclipse.cdt.ui.CUIPlugin;
 
 import org.eclipse.cdt.internal.ui.preferences.NameStylePreferencePage;
-import org.eclipse.cdt.internal.ui.refactoring.gettersandsetters.GetterSetterContext.FieldWrapper;
-import org.eclipse.cdt.internal.ui.refactoring.gettersandsetters.GetterSetterInsertEditProvider.AccessorKind;
+import org.eclipse.cdt.internal.ui.refactoring.gettersandsetters.AccessorDescriptor.AccessorKind;
 
 public class GenerateGettersAndSettersInputPage extends UserInputWizardPage implements IPreferenceChangeListener {
        private GetterSetterContext context;
@@ -45,7 +41,7 @@ public class GenerateGettersAndSettersInputPage extends UserInputWizardPage impl
        private GetterSetterLabelProvider labelProvider;
 
        public GenerateGettersAndSettersInputPage(GetterSetterContext context) {
-               super(Messages.GettersAndSetters_Name); 
+               super(Messages.GenerateGettersAndSettersInputPage_Name); 
                this.context = context;
                IEclipsePreferences node = InstanceScope.INSTANCE.getNode(CUIPlugin.PLUGIN_ID);
                // We are listening for changes in the Name Style preferences
@@ -53,32 +49,31 @@ public class GenerateGettersAndSettersInputPage extends UserInputWizardPage impl
        }
 
        public void createControl(Composite parent) {
-               Composite comp = new Composite(parent, SWT.NONE);
-               
-               setTitle(Messages.GettersAndSetters_Name);
-               setMessage(Messages.GenerateGettersAndSettersInputPage_header);
+               setTitle(Messages.GenerateGettersAndSettersInputPage_Name);
+               setMessage(Messages.GenerateGettersAndSettersInputPage_Header);
                
+               Composite comp = new Composite(parent, SWT.NONE);
                comp.setLayout(new GridLayout(2, false));
                createTree(comp);
                GridData gd = new GridData(GridData.FILL_BOTH);
                variableSelectionView.getTree().setLayoutData(gd);
                
-               Composite btComp = createButtonComposite(comp);
+               Composite buttonContainer = createButtonComposite(comp);
                gd = new GridData();
                gd.verticalAlignment = SWT.TOP;
-               btComp.setLayoutData(gd);
-               
-               final Button placeImplemetation = new Button(comp, SWT.CHECK);
-               placeImplemetation.setText(Messages.GenerateGettersAndSettersInputPage_PlaceImplHeader);
+               buttonContainer.setLayoutData(gd);
+
+               final Button definitionSeparate = new Button(comp, SWT.CHECK);
+               definitionSeparate.setText(Messages.GenerateGettersAndSettersInputPage_SeparateDefinition);
                gd = new GridData();
                gd.horizontalSpan = 2;
                gd.heightHint = 40;
-               placeImplemetation.setLayoutData(gd);
-               placeImplemetation.setSelection(context.isImplementationInHeader());
-               placeImplemetation.addSelectionListener(new SelectionAdapter() {
+               definitionSeparate.setLayoutData(gd);
+               definitionSeparate.setSelection(context.isDefinitionSeparate());
+               definitionSeparate.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
-                               context.setImplementationInHeader(placeImplemetation.getSelection());
+                               context.setDefinitionSeparate(definitionSeparate.getSelection());
                        }
                });
 
@@ -88,7 +83,7 @@ public class GenerateGettersAndSettersInputPage extends UserInputWizardPage impl
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                String id = NameStylePreferencePage.PREF_ID;
-                               PreferencesUtil.createPreferenceDialogOn(getShell(), id, new String [] { id }, null).open();
+                               PreferencesUtil.createPreferenceDialogOn(getShell(), id, new String[] { id }, null).open();
                        }
                });
                link.setToolTipText(Messages.GenerateGettersAndSettersInputPage_LinkTooltip);
@@ -108,21 +103,14 @@ public class GenerateGettersAndSettersInputPage extends UserInputWizardPage impl
                
                Button selectAll = new Button(btComp, SWT.PUSH);
                selectAll.setText(Messages.GenerateGettersAndSettersInputPage_SelectAll);
-               selectAll.addSelectionListener(new SelectionAdapter(){
+               selectAll.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                Object[] items = context.getElements(null);
-                               SortedSet<GetterSetterInsertEditProvider> checkedFunctions = context.selectedFunctions;
                                for (Object treeItem : items) {
                                        variableSelectionView.setChecked(treeItem, true);
-                                       Object[] childs = context.getChildren(treeItem);
-                                       for(Object currentElement : childs){
-                                               if (currentElement instanceof GetterSetterInsertEditProvider) {
-                                                       GetterSetterInsertEditProvider editProvider = (GetterSetterInsertEditProvider) currentElement;
-                                                       checkedFunctions.add(editProvider);
-                                               }
-                                       }
                                }
+                               updateSelectedFunctions();
                        }
                });
                
@@ -131,11 +119,10 @@ public class GenerateGettersAndSettersInputPage extends UserInputWizardPage impl
                deselectAll.addSelectionListener(new SelectionAdapter(){
                        @Override
                        public void widgetSelected(SelectionEvent e) {
-                               Object[] items = context.getElements(null);
-                               for (Object treeItem : items) {
+                               for (Object treeItem : context.getElements(null)) {
                                        variableSelectionView.setChecked(treeItem, false);
                                }
-                               context.selectedFunctions.clear();
+                               updateSelectedFunctions();
                        }
                });
                
@@ -144,7 +131,7 @@ public class GenerateGettersAndSettersInputPage extends UserInputWizardPage impl
                selectGetter.addSelectionListener(new SelectionAdapter(){
                        @Override
                        public void widgetSelected(SelectionEvent e) {
-                               selectMethods(AccessorKind.GETTER);
+                               selectAccessors(AccessorKind.GETTER);
                        }
                });
                
@@ -153,31 +140,29 @@ public class GenerateGettersAndSettersInputPage extends UserInputWizardPage impl
                selectSetter.addSelectionListener(new SelectionAdapter(){
                        @Override
                        public void widgetSelected(SelectionEvent e) {
-                               selectMethods(AccessorKind.SETTER);
+                               selectAccessors(AccessorKind.SETTER);
                        }
                });
                
                return btComp;
        }
        
-       private void selectMethods(AccessorKind type) {
-               Object[] items = context.getElements(null);
-               Set<GetterSetterInsertEditProvider> checked = context.selectedFunctions;
-               for (Object treeItem : items) {
-                       if (treeItem instanceof FieldWrapper) {
-                               FieldWrapper field = (FieldWrapper) treeItem;
-                               Object[] funtions = context.getChildren(field);
-                               for (Object funct : funtions) {
-                                       if (funct instanceof GetterSetterInsertEditProvider) {
-                                               GetterSetterInsertEditProvider getSet = (GetterSetterInsertEditProvider) funct;
-                                               if(getSet.getType() == type) {
-                                                       checked.add(getSet);
-                                                       variableSelectionView.setChecked(getSet, true);
+       private void selectAccessors(AccessorKind kind) {
+               for (Object treeItem : context.getElements(null)) {
+                       if (treeItem instanceof FieldDescriptor) {
+                               FieldDescriptor field = (FieldDescriptor) treeItem;
+                               Object[] children = context.getChildren(field);
+                               for (Object child : children) {
+                                       if (child instanceof AccessorDescriptor) {
+                                               AccessorDescriptor accessor = (AccessorDescriptor) child;
+                                               if (accessor.getKind() == kind) {
+                                                       variableSelectionView.setChecked(accessor, true);
                                                }
                                        }
                                }
                        }
                }
+               updateSelectedFunctions();
        }
 
        private void createTree(Composite comp) {
@@ -187,46 +172,56 @@ public class GenerateGettersAndSettersInputPage extends UserInputWizardPage impl
                variableSelectionView.setLabelProvider(labelProvider);
 
                variableSelectionView.setAutoExpandLevel(3);
-               variableSelectionView.setInput(""); //$NON-NLS-1$
+               variableSelectionView.setInput(context);
                if (context.selectedName != null) {
                        String rawSignature = context.selectedName.getRawSignature();
                        for (Object obj : variableSelectionView.getVisibleExpandedElements()) {
-                               if (obj instanceof FieldWrapper) {
+                               if (obj instanceof FieldDescriptor) {
                                        if (obj.toString().contains(rawSignature)) {
                                                variableSelectionView.setSubtreeChecked(obj, true);
                                        }
                                }
                        }
                }
-               Set<GetterSetterInsertEditProvider> checkedFunctions = context.selectedFunctions;
-               for (Object currentElement : variableSelectionView.getCheckedElements()) {
-                       if (currentElement instanceof GetterSetterInsertEditProvider) {
-                               GetterSetterInsertEditProvider editProvider = (GetterSetterInsertEditProvider) currentElement;
-                               checkedFunctions.add(editProvider);
-                       }
-               }
-               variableSelectionView.addCheckStateListener(new ICheckStateListener() {
 
+               updateSelectedFunctions();
+
+               variableSelectionView.addCheckStateListener(new ICheckStateListener() {
                        public void checkStateChanged(CheckStateChangedEvent event) {
-                               Set<GetterSetterInsertEditProvider> checkedFunctions = context.selectedFunctions;
-                               for (Object currentElement : variableSelectionView.getCheckedElements()) {
-                                       if (currentElement instanceof GetterSetterInsertEditProvider) {
-                                               GetterSetterInsertEditProvider editProvider = (GetterSetterInsertEditProvider) currentElement;
-                                               checkedFunctions.add(editProvider);
-                                       }
-                               }
+                               updateSelectedFunctions();
                        }
                });
        }
 
+       private void updateSelectedFunctions() {
+               context.selectedAccessors.clear();
+               for (Object element : variableSelectionView.getCheckedElements()) {
+                       if (element instanceof AccessorDescriptor) {
+                               context.selectedAccessors.add((AccessorDescriptor) element);
+                       }
+               }
+               setPageComplete(!context.selectedAccessors.isEmpty());
+       }
+
        public void preferenceChange(PreferenceChangeEvent event) {
                if (variableSelectionView.getTree().isDisposed()) {
                        return;
                }
                
                if (GetterSetterNameGenerator.getGenerateGetterSettersPreferenceKeys().contains(event.getKey())) {
-                       context.refresh();
+                       context.recreateFieldDescriptors();
                        variableSelectionView.refresh();
+                       variableSelectionView.setInput(context); // Set input to trigger node expansion.
+                       for (Object element : context.selectedAccessors) {
+                               variableSelectionView.setChecked(element, true);
+                       }
                }
        }
+
+       @Override
+       public void dispose() {
+               IEclipsePreferences node = InstanceScope.INSTANCE.getNode(CUIPlugin.PLUGIN_ID);
+               node.removePreferenceChangeListener(this);
+               super.dispose();
+       }
 }
index 674491b..71f1a6a 100644 (file)
@@ -121,9 +121,10 @@ public class GenerateGettersAndSettersRefactoring extends CRefactoring2 {
        public RefactoringStatus checkFinalConditions(IProgressMonitor pm,
                        CheckConditionsContext checkContext) throws CoreException, OperationCanceledException {
                RefactoringStatus result = new RefactoringStatus();
-               if (!context.isImplementationInHeader()) {
+               if (context.isDefinitionSeparate()) {
                        findDefinitionInsertLocation(pm);
-                       if (definitionInsertLocation == null || tu.equals(definitionInsertLocation.getTranslationUnit())) {
+                       if (definitionInsertLocation == null ||
+                                       definitionInsertLocation.getTranslationUnit() == null) {
                                result.addInfo(Messages.GenerateGettersAndSettersRefactoring_NoImplFile);
                        }
                }
@@ -158,7 +159,7 @@ public class GenerateGettersAndSettersRefactoring extends CRefactoring2 {
                if (compositeTypeSpecifier != null) {
                        findDeclarations(compositeTypeSpecifier);
                } else {
-                       initStatus.addFatalError(Messages.GenerateGettersAndSettersRefactoring_NoCassDefFound);
+                       initStatus.addFatalError(Messages.GenerateGettersAndSettersRefactoring_NoClassDefFound);
                }
        }
        
@@ -229,15 +230,20 @@ public class GenerateGettersAndSettersRefactoring extends CRefactoring2 {
                        throws CoreException, OperationCanceledException {
                List<IASTNode> getterAndSetters = new ArrayList<IASTNode>();
                List<IASTFunctionDefinition> definitions = new ArrayList<IASTFunctionDefinition>();
-               for (GetterSetterInsertEditProvider currentProvider : context.selectedFunctions) {
-                       if (context.isImplementationInHeader()) {
-                               getterAndSetters.add(currentProvider.getFunctionDefinition(false));
+               for (AccessorDescriptor accessor : context.selectedAccessors) {
+                       if (context.isDefinitionSeparate()) {
+                               getterAndSetters.add(accessor.getAccessorDeclaration());
+                               IASTFunctionDefinition functionDefinition = accessor.getAccessorDefinition(true);
+                               // Standalone definitions in a header file have to be declared inline. 
+                               if (definitionInsertLocation.getTranslationUnit().isHeaderUnit()) {
+                                       functionDefinition.getDeclSpecifier().setInline(true);
+                               }
+                               definitions.add(functionDefinition);
                        } else {
-                               getterAndSetters.add(currentProvider.getFunctionDeclaration());
-                               definitions.add(currentProvider.getFunctionDefinition(true));
+                               getterAndSetters.add(accessor.getAccessorDefinition(false));
                        }
                }
-               if (!context.isImplementationInHeader()) {
+               if (context.isDefinitionSeparate()) {
                        addDefinition(collector, definitions, pm);
                }
                ICPPASTCompositeTypeSpecifier classDefinition =
@@ -271,9 +277,9 @@ public class GenerateGettersAndSettersRefactoring extends CRefactoring2 {
                }
                
                IASTSimpleDeclaration decl = context.existingFields.get(0);
-               MethodDefinitionInsertLocationFinder methodDefinitionInsertLocationFinder = new MethodDefinitionInsertLocationFinder();
-               InsertLocation location = methodDefinitionInsertLocationFinder.find(
-                               tu, decl.getFileLocation(), decl.getParent(), astCache, pm);
+               MethodDefinitionInsertLocationFinder locationFinder = new MethodDefinitionInsertLocationFinder();
+               InsertLocation location = locationFinder.find(tu, decl.getFileLocation(), decl.getParent(),
+                               astCache, pm);
 
                if (location.getFile() == null || NodeHelper.isContainedInTemplateDeclaration(decl)) {
                        location.setNodeToInsertAfter(NodeHelper.findTopLevelParent(decl), tu);
index 757619c..257867f 100644 (file)
@@ -13,6 +13,7 @@
 package org.eclipse.cdt.internal.ui.refactoring.gettersandsetters;
 
 import java.util.ArrayList;
+import java.util.List;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
@@ -24,43 +25,22 @@ import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
 import org.eclipse.cdt.core.dom.ast.IASTName;
 import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
 
-import org.eclipse.cdt.internal.ui.refactoring.gettersandsetters.GetterSetterInsertEditProvider.AccessorKind;
+import org.eclipse.cdt.internal.ui.refactoring.gettersandsetters.AccessorDescriptor.AccessorKind;
 
 public class GetterSetterContext implements ITreeContentProvider {
-       public ArrayList<IASTSimpleDeclaration> existingFields = new ArrayList<IASTSimpleDeclaration>();
-       public ArrayList<IASTFunctionDefinition> existingFunctionDefinitions = new ArrayList<IASTFunctionDefinition>();
-       public ArrayList<IASTSimpleDeclaration> existingFunctionDeclarations = new ArrayList<IASTSimpleDeclaration>();
-       public SortedSet<GetterSetterInsertEditProvider> selectedFunctions = new TreeSet<GetterSetterInsertEditProvider>();
-       public IASTName selectedName;
-       private ArrayList<FieldWrapper> wrappedFields;
-       private boolean implementationInHeader = false;
+       final List<IASTSimpleDeclaration> existingFields = new ArrayList<IASTSimpleDeclaration>();
+       final List<IASTFunctionDefinition> existingFunctionDefinitions = new ArrayList<IASTFunctionDefinition>();
+       final List<IASTSimpleDeclaration> existingFunctionDeclarations = new ArrayList<IASTSimpleDeclaration>();
+       final SortedSet<AccessorDescriptor> selectedAccessors = new TreeSet<AccessorDescriptor>();
+       IASTName selectedName;
+       private List<FieldDescriptor> fieldDescriptors;
+       private boolean definitionSeparate;
+       private static final Object[] NO_CHILDREN = {};
 
        public Object[] getChildren(Object parentElement) {
-               ArrayList<GetterSetterInsertEditProvider> children = new ArrayList<GetterSetterInsertEditProvider>();
-               if (parentElement instanceof FieldWrapper) {
-                       FieldWrapper wrapper = (FieldWrapper) parentElement;
-                       
-                       if (wrapper.getChildNodes().isEmpty()) {
-                               if (!wrapper.getter.exists()) {
-                                       wrapper.childNodes.add(createGetterInserter(wrapper.field));
-                               }
-                               if (!wrapper.setter.exists() && !wrapper.field.getDeclSpecifier().isConst()) {
-                                       wrapper.childNodes.add(createSetterInserter(wrapper.field));
-                               }
-                       }
-                       children = wrapper.getChildNodes();
-               }
-               return children.toArray();
-       }
-
-       public GetterSetterInsertEditProvider createGetterInserter(IASTSimpleDeclaration simpleDeclaration) {
-               IASTName fieldName = getFieldDeclarationName(simpleDeclaration);
-               return new GetterSetterInsertEditProvider(fieldName, simpleDeclaration, AccessorKind.GETTER);
-       }
-
-       public GetterSetterInsertEditProvider createSetterInserter(IASTSimpleDeclaration simpleDeclaration) {
-               IASTName fieldName = getFieldDeclarationName(simpleDeclaration);
-               return new GetterSetterInsertEditProvider(fieldName, simpleDeclaration, AccessorKind.SETTER);
+               if (!(parentElement instanceof FieldDescriptor))
+                       return NO_CHILDREN;
+               return ((FieldDescriptor) parentElement).getChildNodes();
        }
 
        public Object getParent(Object element) {
@@ -68,124 +48,77 @@ public class GetterSetterContext implements ITreeContentProvider {
        }
 
        public boolean hasChildren(Object element) {
-               if (element instanceof FieldWrapper) {
-                       FieldWrapper wrapper = (FieldWrapper) element;
-                       return wrapper.missingGetterOrSetter();
+               if (element instanceof FieldDescriptor) {
+                       FieldDescriptor descriptor = (FieldDescriptor) element;
+                       return descriptor.missingGetterOrSetter();
                }
                return false;
        }
 
        public Object[] getElements(Object inputElement) {
-               return getWrappedFields().toArray();
+               return getFieldDescriptors().toArray();
        }
        
-       public void refresh() {
-               // We only recreate the function declarations instead of recreating GetterSetterInsertEditProviders.
-               // That way, selectedFunctions is still valid. Also, the objects inside the TreeViewer are still the same
-               // which is convenient because that way we don't need to save then restore the collapsed/expanded+checked/unchecked state of the TreeViewer.
-               for (FieldWrapper wrapper : wrappedFields) {
-                       for (GetterSetterInsertEditProvider provider : wrapper.childNodes) {
-                               provider.createFunctionDeclaration();
-                       }
-               }
-       }
-
        public void dispose() {
        }
 
        public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
        }
-       
-       public boolean isImplementationInHeader() {
-               return implementationInHeader;
-       }
 
-       public void setImplementationInHeader(boolean implementationInHeader) {
-               this.implementationInHeader = implementationInHeader;
+       public void recreateFieldDescriptors() {
+               // Delete field descriptors so that they are recreated by the next getFieldDescriptors call.
+               fieldDescriptors = null;
+               SortedSet<AccessorDescriptor> oldSelected = new TreeSet<AccessorDescriptor>(selectedAccessors);
+               selectedAccessors.clear();
+               for (FieldDescriptor descriptor : getFieldDescriptors()) {
+                       for (AccessorDescriptor accessor : descriptor.getChildNodes()) {
+                               if (oldSelected.contains(accessor)) {
+                                       selectedAccessors.add(accessor);
+                               }
+                       }
+               }
        }
 
-       private ArrayList<FieldWrapper> getWrappedFields() {
-               if (wrappedFields == null) {
-                       wrappedFields = new ArrayList<FieldWrapper>();
-                       for (IASTSimpleDeclaration currentField : existingFields) {
-                               FieldWrapper wrapper = new FieldWrapper();
-                               wrapper.field = currentField;
-                               wrapper.getter = getGetterForField(currentField);
-                               wrapper.setter = getSetterForField(currentField);
-                               if (wrapper.missingGetterOrSetter()) {
-                                       wrappedFields.add(wrapper);
+       public void selectAccessorForField(String name, AccessorKind kind) {
+               for (FieldDescriptor descriptor : getFieldDescriptors()) {
+                       if (name.equals(String.valueOf(descriptor.getFieldName().getSimpleID()))) {
+                               for (Object child : descriptor.getChildNodes()) {
+                                       AccessorDescriptor accessor = (AccessorDescriptor) child;
+                                       if (accessor.getKind() == kind) {
+                                               selectedAccessors.add(accessor);
+                                               break;
+                                       }
                                }
                        }
                }
-               return wrappedFields;
        }
 
-       private FunctionWrapper getGetterForField(IASTSimpleDeclaration currentField) {
-               FunctionWrapper wrapper = new FunctionWrapper();
-               String name = GetterSetterNameGenerator.generateGetterName(getFieldDeclarationName(currentField));
-               setFunctionToWrapper(wrapper, name);
-               return wrapper;
+       public boolean isDefinitionSeparate() {
+               return definitionSeparate;
        }
 
-       private IASTName getFieldDeclarationName(IASTSimpleDeclaration fieldDeclaration) {
-               IASTDeclarator declarator = fieldDeclaration.getDeclarators()[0];
-               while (declarator.getNestedDeclarator() != null) {
-                       declarator = declarator.getNestedDeclarator();
-               }
-               return declarator.getName();
-       }
-       
-       private FunctionWrapper getSetterForField(IASTSimpleDeclaration currentField) {
-               FunctionWrapper wrapper = new FunctionWrapper();
-               String name = GetterSetterNameGenerator.generateSetterName(getFieldDeclarationName(currentField));
-               setFunctionToWrapper(wrapper, name);
-               return wrapper;
+       public void setDefinitionSeparate(boolean definitionSeparate) {
+               this.definitionSeparate = definitionSeparate;
        }
 
-       private void setFunctionToWrapper(FunctionWrapper wrapper, String getterName) {
-               for (IASTFunctionDefinition currentDefinition : existingFunctionDefinitions) {
-                       if (currentDefinition.getDeclarator().getName().toString().endsWith(getterName)) {
-                               wrapper.functionDefinition = currentDefinition;
-                       }
-               }
-               
-               for (IASTSimpleDeclaration currentDeclaration : existingFunctionDeclarations) {
-                       if (getFieldDeclarationName(currentDeclaration).toString().endsWith(getterName)) {
-                               wrapper.functionDeclaration = currentDeclaration;
+       private List<FieldDescriptor> getFieldDescriptors() {
+               if (fieldDescriptors == null) {
+                       fieldDescriptors = new ArrayList<FieldDescriptor>();
+                       for (IASTSimpleDeclaration field : existingFields) {
+                               FieldDescriptor descriptor = new FieldDescriptor(field, this);
+                               if (descriptor.missingGetterOrSetter()) {
+                                       fieldDescriptors.add(descriptor);
+                               }
                        }
                }
+               return fieldDescriptors;
        }
 
-       protected class FieldWrapper {
-               protected IASTSimpleDeclaration field;
-               protected FunctionWrapper getter;
-               protected FunctionWrapper setter;
-               protected ArrayList<GetterSetterInsertEditProvider> childNodes = new ArrayList<GetterSetterInsertEditProvider>(2);
-               
-               @Override
-               public String toString() {
-                       IASTDeclarator declarator = field.getDeclarators()[0];
-                       while (declarator.getNestedDeclarator() != null) {
-                               declarator = declarator.getNestedDeclarator();
-                       }
-                       return declarator.getName().toString();
-               }
-
-               public ArrayList<GetterSetterInsertEditProvider> getChildNodes() {
-                       return childNodes;
-               }
-
-               public boolean missingGetterOrSetter() {
-                       return !getter.exists() || !setter.exists();
-               }
-       }
-       
-       protected class FunctionWrapper {
-               protected IASTSimpleDeclaration functionDeclaration;
-               protected IASTFunctionDefinition functionDefinition;
-               
-               public boolean exists() {
-                       return functionDeclaration != null || functionDefinition != null;
+       static IASTName getDeclarationName(IASTSimpleDeclaration declaration) {
+               IASTDeclarator declarator = declaration.getDeclarators()[0];
+               while (declarator.getNestedDeclarator() != null) {
+                       declarator = declarator.getNestedDeclarator();
                }
+               return declarator.getName();
        }
 }
diff --git a/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/GetterSetterInsertEditProvider.java b/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/gettersandsetters/GetterSetterInsertEditProvider.java
deleted file mode 100644 (file)
index 05eb4e9..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik  
- * Rapperswil, University of applied sciences and others
- * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Eclipse Public License v1.0 
- * which accompanies this distribution, and is available at 
- * http://www.eclipse.org/legal/epl-v10.html  
- *  
- * Contributors: 
- *     Institute for Software - initial API and implementation
- *     Sergey Prigogin (Google)
- *******************************************************************************/
-package org.eclipse.cdt.internal.ui.refactoring.gettersandsetters;
-
-import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
-import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
-import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
-import org.eclipse.cdt.core.dom.ast.IASTName;
-import org.eclipse.cdt.core.dom.ast.IASTNode;
-import org.eclipse.cdt.core.dom.ast.IASTNode.CopyStyle;
-import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
-import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName;
-
-import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTQualifiedName;
-
-public class GetterSetterInsertEditProvider implements Comparable<GetterSetterInsertEditProvider> {
-       public enum AccessorKind {
-               GETTER,
-               SETTER;
-       }
-       
-       private IASTSimpleDeclaration functionDeclaration;
-       private AccessorKind kind;
-       private IASTName fieldName;
-       private IASTSimpleDeclaration fieldDeclaration;
-       
-       public GetterSetterInsertEditProvider(IASTName fieldName, IASTSimpleDeclaration fieldDeclaration,
-                       AccessorKind kind) {
-               this.kind = kind;
-               this.fieldName = fieldName;
-               this.fieldDeclaration = fieldDeclaration;
-               
-               createFunctionDeclaration();
-       }
-
-       public void createFunctionDeclaration() {
-               switch (this.kind) {
-               case GETTER:
-                       this.functionDeclaration = FunctionFactory.createGetterDeclaration(fieldName, fieldDeclaration);
-                       break;
-               case SETTER:
-                       this.functionDeclaration = FunctionFactory.createSetterDeclaration(fieldName, fieldDeclaration);
-                       break;
-               }
-       }
-       
-       @Override
-       public String toString() {
-               IASTDeclarator declarator = functionDeclaration.getDeclarators()[0];
-               while (declarator.getNestedDeclarator() != null) {
-                       declarator = declarator.getNestedDeclarator();
-               }
-               return declarator.getName().toString();
-       }
-
-       public IASTFunctionDefinition getFunctionDefinition(boolean qualifedName) {
-               IASTFunctionDefinition definition = null;
-               ICPPASTQualifiedName qname;
-               if (qualifedName) {
-                       qname = getClassname();
-               } else {
-                       qname = null;
-               }
-               
-               switch (kind) {
-               case GETTER:
-                       definition = FunctionFactory.createGetterDefinition(fieldName, fieldDeclaration, qname);
-                       break;
-               case SETTER:
-                       definition = FunctionFactory.createSetterDefinition(fieldName, fieldDeclaration, qname);
-                       break;
-               }
-               return definition;
-       }
-       
-       private ICPPASTQualifiedName getClassname() {
-               IASTNode n = fieldDeclaration.getParent();
-               while (!(n instanceof IASTCompositeTypeSpecifier)) {
-                       n = n.getParent();
-               }
-               IASTCompositeTypeSpecifier comp = (IASTCompositeTypeSpecifier) n;
-               
-               CPPASTQualifiedName qname = new CPPASTQualifiedName();
-               qname.addName(comp.getName().copy(CopyStyle.withLocations));
-               return qname;
-       }
-
-       public IASTSimpleDeclaration getFunctionDeclaration() {
-               return functionDeclaration;
-       }
-
-       public AccessorKind getType() {
-               return kind;
-       }
-
-       public int compareTo(GetterSetterInsertEditProvider o) {
-               return toString().compareTo(o.toString());
-       }
-}
index 927579f..a5ba6dc 100644 (file)
@@ -22,10 +22,9 @@ import org.eclipse.cdt.internal.ui.viewsupport.CElementImageProvider;
  * @author Emanuel Graf IFS
  */
 public class GetterSetterLabelProvider extends LabelProvider {
-
        @Override
        public Image getImage(Object element) {
-               if (element instanceof GetterSetterInsertEditProvider) {
+               if (element instanceof AccessorDescriptor) {
                        return CElementImageProvider.getMethodImageDescriptor(ASTAccessVisibility.PUBLIC).createImage();
                }
                return null;
index 229fe84..f13586f 100644 (file)
@@ -16,11 +16,12 @@ import java.util.Set;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.preferences.IPreferencesService;
 
-
+import org.eclipse.cdt.core.CConventions;
 import org.eclipse.cdt.core.dom.ast.IASTDeclarator;
 import org.eclipse.cdt.core.dom.ast.IASTName;
 import org.eclipse.cdt.core.dom.ast.IBasicType;
 import org.eclipse.cdt.core.dom.ast.IType;
+import org.eclipse.cdt.core.dom.ast.gnu.cpp.GPPLanguage;
 import org.eclipse.cdt.ui.CUIPlugin;
 import org.eclipse.cdt.ui.PreferenceConstants;
 
@@ -29,11 +30,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor;
 import org.eclipse.cdt.internal.ui.util.NameComposer;
 
 public class GetterSetterNameGenerator {
-
-       // Do not instantiate.
-       private GetterSetterNameGenerator() {
-       }
-       
        private static Set<String> generateGetterSettersPreferenceKeys = new HashSet<String>();
        static {
                generateGetterSettersPreferenceKeys.add(PreferenceConstants.NAME_STYLE_GETTER_CAPITALIZATION);
@@ -51,18 +47,30 @@ public class GetterSetterNameGenerator {
                generateGetterSettersPreferenceKeys.add(PreferenceConstants.NAME_STYLE_VARIABLE_SUFFIX);
        }
 
+       // Do not instantiate.
+       private GetterSetterNameGenerator() {
+       }
+       
        public static Set<String> getGenerateGetterSettersPreferenceKeys() {
                return generateGetterSettersPreferenceKeys;
        }
-       
-       public static String generateGetterName(IASTName fieldName) {
+
+       /**
+        * Generates getter name for a given field name.
+        * 
+        * @param fieldName the name of the field
+        * @param namesToAvoid the set of names to avoid
+        * @return the generated getter name, or <code>null</code> if a valid name could not be
+        *     generated.
+        */
+       public static String generateGetterName(IASTName fieldName, Set<String> namesToAvoid) {
        IPreferencesService preferences = Platform.getPreferencesService();
        int capitalization = preferences.getInt(CUIPlugin.PLUGIN_ID,
                        PreferenceConstants.NAME_STYLE_GETTER_CAPITALIZATION,
                        PreferenceConstants.NAME_STYLE_CAPITALIZATION_CAMEL_CASE, null);
        String wordDelimiter = preferences.getString(CUIPlugin.PLUGIN_ID,
                        PreferenceConstants.NAME_STYLE_GETTER_WORD_DELIMITER, "", null); //$NON-NLS-1$
-       String prefix = isBooleanDecaratorName(fieldName) ?
+       String prefix = isBooleanDeclaratorName(fieldName) ?
                        preferences.getString(CUIPlugin.PLUGIN_ID,
                                        PreferenceConstants.NAME_STYLE_GETTER_PREFIX_FOR_BOOLEAN, "is", null) : //$NON-NLS-1$
                                preferences.getString(CUIPlugin.PLUGIN_ID,
@@ -71,10 +79,11 @@ public class GetterSetterNameGenerator {
                        PreferenceConstants.NAME_STYLE_GETTER_SUFFIX, "", null); //$NON-NLS-1$
        NameComposer composer = new NameComposer(capitalization, wordDelimiter, prefix, suffix);
        String name = NameComposer.trimFieldName(fieldName.toString());
-       return composer.compose(name);
+       name = composer.compose(name);
+       return adjustName(name, namesToAvoid);
        }
        
-       private static boolean isBooleanDecaratorName(IASTName name) {
+       private static boolean isBooleanDeclaratorName(IASTName name) {
                if (IASTDeclarator.DECLARATOR_NAME.equals(name.getPropertyInParent())) {
                        IASTDeclarator declarator = (IASTDeclarator) name.getParent();
                        IType type = CPPVisitor.createType(declarator);
@@ -85,7 +94,15 @@ public class GetterSetterNameGenerator {
                return false;
        }
 
-       public static String generateSetterName(IASTName fieldName) {
+       /**
+        * Generates setter name for a given field name.
+        * 
+        * @param fieldName the name of the field
+        * @param namesToAvoid the set of names to avoid
+        * @return the generated setter name, or <code>null</code> if a valid name could not be
+        *     generated.
+        */
+       public static String generateSetterName(IASTName fieldName, Set<String> namesToAvoid) {
                IPreferencesService preferences = Platform.getPreferencesService();
                int capitalization = preferences.getInt(CUIPlugin.PLUGIN_ID,
                                PreferenceConstants.NAME_STYLE_SETTER_CAPITALIZATION,
@@ -98,10 +115,11 @@ public class GetterSetterNameGenerator {
                                PreferenceConstants.NAME_STYLE_SETTER_SUFFIX, "", null); //$NON-NLS-1$
                NameComposer composer = new NameComposer(capitalization, wordDelimiter, prefix, suffix);
                String name = NameComposer.trimFieldName(fieldName.toString());
-               return composer.compose(name);
+               name = composer.compose(name);
+       return adjustName(name, namesToAvoid);
        }
 
-       public static String generateSetterParameterName(IASTName fieldName) {
+       public static String generateSetterParameterName(IASTName fieldName){
                IPreferencesService preferences = Platform.getPreferencesService();
                int capitalization = preferences.getInt(CUIPlugin.PLUGIN_ID,
                                PreferenceConstants.NAME_STYLE_VARIABLE_CAPITALIZATION,
@@ -114,6 +132,28 @@ public class GetterSetterNameGenerator {
                                PreferenceConstants.NAME_STYLE_VARIABLE_SUFFIX, "", null); //$NON-NLS-1$
                NameComposer composer = new NameComposer(capitalization, wordDelimiter, prefix, suffix);
                String name = NameComposer.trimFieldName(fieldName.toString());
-               return composer.compose(name);
+               name = composer.compose(name);
+               if (!CConventions.validateIdentifier(name, GPPLanguage.getDefault()).isOK())
+                       name = '_' + name;
+               return name;
+       }
+
+       /**
+        * Checks is the given name is valid and, if not, tries to adjust it by adding a numeric suffix
+        * to it.
+        * 
+        * @param name the name to check and, possibly, adjust
+        * @param namesToAvoid the set of names to avoid
+        * @return the adjusted name, or <code>null</code> if a valid name could not be generated. 
+        */
+       private static String adjustName(String name, Set<String> namesToAvoid) {
+               String originalName = name;
+               for (int i = 1; i < 100; i++) {
+                       if (!namesToAvoid.contains(name) && CConventions.validateIdentifier(name, GPPLanguage.getDefault()).isOK()) {
+                               return name;
+                       }
+                       name = originalName + i;
+               }
+               return null;
        }
 }
index 8094488..f6cac1f 100644 (file)
@@ -15,17 +15,17 @@ import org.eclipse.osgi.util.NLS;
 
 public final class Messages extends NLS {
        public static String GenerateGettersAndSettersInputPage_DeselectAll;
-       public static String GenerateGettersAndSettersInputPage_header;
-       public static String GenerateGettersAndSettersInputPage_PlaceImplHeader;
+       public static String GenerateGettersAndSettersInputPage_Header;
+       public static String GenerateGettersAndSettersInputPage_LinkDescription;
+       public static String GenerateGettersAndSettersInputPage_LinkTooltip;
+       public static String GenerateGettersAndSettersInputPage_Name;
+       public static String GenerateGettersAndSettersInputPage_SeparateDefinition;
        public static String GenerateGettersAndSettersInputPage_SelectAll;
        public static String GenerateGettersAndSettersInputPage_SelectGetters;
        public static String GenerateGettersAndSettersInputPage_SelectSetters;
-       public static String GenerateGettersAndSettersInputPage_LinkDescription;
-       public static String GenerateGettersAndSettersInputPage_LinkTooltip;
-       public static String GenerateGettersAndSettersRefactoring_NoCassDefFound;
+       public static String GenerateGettersAndSettersRefactoring_NoClassDefFound;
        public static String GenerateGettersAndSettersRefactoring_NoFields;
        public static String GenerateGettersAndSettersRefactoring_NoImplFile;
-       public static String GettersAndSetters_Name;
 
        static {
                NLS.initializeMessages(Messages.class.getName(), Messages.class);
index c9cf1f7..f57203d 100644 (file)
@@ -7,17 +7,17 @@
 # http://www.eclipse.org/legal/epl-v10.html
 #
 # Contributors:
-# Institute for Software - initial API and implementation
+#     Institute for Software - initial API and implementation
 ###############################################################################
-GettersAndSetters_Name=Generate getters and setters
 GenerateGettersAndSettersInputPage_DeselectAll=Deselect All
-GenerateGettersAndSettersInputPage_header=Select getters and setters to create:
-GenerateGettersAndSettersInputPage_PlaceImplHeader=Place implementation in header file
+GenerateGettersAndSettersInputPage_Header=Select getters and setters to create:
+GenerateGettersAndSettersInputPage_LinkDescription=The names of getters and setters may be configured on the <a>Name Style</a> preference page.
+GenerateGettersAndSettersInputPage_LinkTooltip=Show the name style preferences.
+GenerateGettersAndSettersInputPage_Name=Generate getters and setters
+GenerateGettersAndSettersInputPage_SeparateDefinition=Definition separate from declaration 
 GenerateGettersAndSettersInputPage_SelectAll=Select All
 GenerateGettersAndSettersInputPage_SelectGetters=Select Getters
 GenerateGettersAndSettersInputPage_SelectSetters=Select Setters
-GenerateGettersAndSettersInputPage_LinkDescription=The names of getters and setters may be configured on the <a>Name Style</a> preference page.
-GenerateGettersAndSettersInputPage_LinkTooltip=Show the name style preferences.
-GenerateGettersAndSettersRefactoring_NoCassDefFound=No class definition found
+GenerateGettersAndSettersRefactoring_NoClassDefFound=No class definition found
 GenerateGettersAndSettersRefactoring_NoFields=The class does not contain any fields.
 GenerateGettersAndSettersRefactoring_NoImplFile=No implementation file found. Inserting definition into the header file.
index 510c842..fde3219 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik  
+ * Copyright (c) 2008, 2012 Institute for Software, HSR Hochschule fuer Technik  
  * Rapperswil, University of applied sciences and others
  * All rights reserved. This program and the accompanying materials 
  * are made available under the terms of the Eclipse Public License v1.0 
@@ -7,8 +7,8 @@
  * http://www.eclipse.org/legal/epl-v10.html  
  *  
  * Contributors: 
- * Institute for Software - initial API and implementation
- * Marc-Andre Laperle
+ *     Institute for Software - initial API and implementation
+ *     Marc-Andre Laperle
  *******************************************************************************/
 package org.eclipse.cdt.internal.ui.refactoring.implementmethod;
 
@@ -91,14 +91,20 @@ public class ImplementMethodRefactoring extends CRefactoring2 {
                super.checkInitialConditions(sm.newChild(6));
 
                if (!initStatus.hasFatalError()) {
-                       data.setMethodDeclarations(findUnimplementedMethodDeclarations(pm));
+                       List<IASTSimpleDeclaration> unimplementedMethodDeclarations = findUnimplementedMethodDeclarations(pm);
+                       if (unimplementedMethodDeclarations.isEmpty()) {
+                               initStatus.addFatalError(Messages.ImplementMethodRefactoring_NoMethodToImplement);
+                       }
+                       else {
+                               data.setMethodDeclarations(unimplementedMethodDeclarations);
 
-                       if (selectedRegion.getLength() > 0) {
-                               IASTSimpleDeclaration methodDeclaration = SelectionHelper.findFirstSelectedDeclaration(selectedRegion, astCache.getAST(tu, pm));
-                               if (NodeHelper.isMethodDeclaration(methodDeclaration)) {
-                                       for (MethodToImplementConfig config : data.getMethodDeclarations()) {
-                                               if (config.getDeclaration() == methodDeclaration) {
-                                                       config.setChecked(true);
+                               if (selectedRegion.getLength() > 0) {
+                                       IASTSimpleDeclaration methodDeclaration = SelectionHelper.findFirstSelectedDeclaration(selectedRegion, astCache.getAST(tu, pm));
+                                       if (NodeHelper.isMethodDeclaration(methodDeclaration)) {
+                                               for (MethodToImplementConfig config : data.getMethodDeclarations()) {
+                                                       if (config.getDeclaration() == methodDeclaration) {
+                                                               config.setChecked(true);
+                                                       }
                                                }
                                        }
                                }
@@ -237,7 +243,8 @@ public class ImplementMethodRefactoring extends CRefactoring2 {
                IASTNode declarationParent = methodDeclaration.getParent();
                
                if (declSpecifier instanceof ICPPASTDeclSpecifier) {
-                       ((ICPPASTDeclSpecifier) declSpecifier).setVirtual(false); 
+                       ((ICPPASTDeclSpecifier) declSpecifier).setVirtual(false);
+                       ((ICPPASTDeclSpecifier) declSpecifier).setExplicit(false);
                }
                
                String currentFileName = declarationParent.getNodeLocations()[0].asFileLocation().getFileName();
index 52e3420..c3ded7f 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- *  Copyright (c) 2005, 2011 IBM Corporation and others.
+ *  Copyright (c) 2005, 2012 IBM Corporation and others.
  *  All rights reserved. This program and the accompanying materials
  *  are made available under the terms of the Eclipse Public License v1.0
  *  which accompanies this distribution, and is available at
@@ -21,7 +21,7 @@ public final class Messages extends NLS {
        public static String ImplementMethodRefactoringPage_GeneratingPreview;
        public static String ImplementMethodRefactoringPage_PreviewCanceled;
        public static String ImplementMethodRefactoringPage_PreviewGenerationNotPossible;
-       public static String ImplementMethodRefactoring_NoMethodSelected;
+       public static String ImplementMethodRefactoring_NoMethodToImplement;
        public static String ImplementMethodRefactoring_MethodHasImpl;
        public static String ImplementMethodRefactoring_NoImplFile;
        public static String ImplementMethodRefactoringWizard_CancelingPreviewGeneration;
index 1b60d0f..452aa2d 100644 (file)
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2008, 2011 Institute for Software, HSR Hochschule fuer Technik
+# Copyright (c) 2008, 2012 Institute for Software, HSR Hochschule fuer Technik
 # Rapperswil, University of applied sciences and others
 # All rights reserved. This program and the accompanying materials
 # are made available under the terms of the Eclipse Public License v1.0
@@ -20,7 +20,7 @@ ImplementMethodInputPage_DeselectAll=Deselect All
 ImplementMethodRefactoringPage_PreviewGenerationNotPossible=Preview generation not possible
 ImplementMethodRefactoringPage_GeneratingPreview=Generating preview...
 ImplementMethodRefactoringPage_PreviewCanceled=Preview canceled
-ImplementMethodRefactoring_NoMethodSelected=No method declaration selected
+ImplementMethodRefactoring_NoMethodToImplement=No methods to implement found.
 ImplementMethodRefactoring_MethodHasImpl=This method already has an implementation.
 ImplementMethodRefactoring_NoImplFile=No implementation file found for one or more method. Inserting definition(s) into the header file.
 ImplementMethodRefactoringWizard_CancelingPreviewGeneration=Canceling preview generation
\ No newline at end of file
index 2430e7b..f841aba 100644 (file)
@@ -105,11 +105,15 @@ public class MethodDefinitionInsertLocationFinder {
                }
 
                if (insertLocation.getTranslationUnit() == null) {
-                       ITranslationUnit partner = SourceHeaderPartnerFinder.getPartnerTranslationUnit(
-                                       declarationTu, astCache);
-                       if (partner != null) {
-                               insertLocation.setParentNode(astCache.getAST(partner, null), partner);
-                       }       
+                       if (declarationTu.isHeaderUnit()) {
+                               ITranslationUnit partner = SourceHeaderPartnerFinder.getPartnerTranslationUnit(
+                                               declarationTu, astCache);
+                               if (partner != null) {
+                                       insertLocation.setParentNode(astCache.getAST(partner, null), partner);
+                               }
+                       } else {
+                               insertLocation.setParentNode(parent.getTranslationUnit(), declarationTu);
+                       }
                }
 
                return insertLocation;
index 8247988..b5c6c09 100644 (file)
@@ -218,4 +218,12 @@ public class ParameterNamesInputPage extends UserInputWizardPage {
                }
                delayedPreviewUpdater.schedule(PREVIEW_UPDATE_DELAY);
        }
+       
+       @Override
+       public boolean isPageComplete() {
+               if (!config.isChecked()) {
+                       return true;
+               }
+               return super.isPageComplete();
+       }
 }
index af94f75..4c5afdb 100644 (file)
@@ -98,6 +98,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespaceScope;
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPReferenceType;
 import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter;
 import org.eclipse.cdt.core.index.IIndex;
+import org.eclipse.cdt.core.index.IIndexBinding;
 import org.eclipse.cdt.core.index.IIndexName;
 import org.eclipse.cdt.core.model.CoreModel;
 import org.eclipse.cdt.core.model.ICElement;
@@ -183,13 +184,26 @@ public class ASTManager implements IDisposable {
      * Returns TRUE, FALSE or UNKNOWN.
      * @throws DOMException 
      */
-    public static int isSameBinding(IBinding b1, IBinding b2) throws DOMException {
+    public static int isSameBinding(IIndex index, IBinding b1, IBinding b2) throws DOMException {
         if (b1 == null || b2 == null) {
             return UNKNOWN;
         }
         if (b1.equals(b2)) {
             return TRUE;
         }
+        if (b1 instanceof IIndexBinding || b2 instanceof IIndexBinding) {
+               if (index != null) {
+                       IIndexBinding b11 = index.adaptBinding(b1);
+                       if (b11 != null)
+                               b1= b11;
+                       IIndexBinding b21 = index.adaptBinding(b2);
+                       if (b21 != null)
+                               b2= b21;
+                if (b1.equals(b2))
+                       return TRUE;
+               }
+        }
+        
         String n1= b1.getName();
         String n2= b2.getName();
         if (n1 == null || n2 == null) {
@@ -1191,9 +1205,11 @@ public class ASTManager implements IDisposable {
                if (problemInQualifier) {
                        cmp= UNKNOWN;
                } else {
+                       final IASTTranslationUnit tu = name.getTranslationUnit();
+                       final IIndex index= tu != null ? tu.getIndex() : null;
                        for (IBinding renameBinding : fValidBindings) {
                                try {
-                                       int cmp0= isSameBinding(binding, renameBinding);
+                                       int cmp0= isSameBinding(index, binding, renameBinding);
                                        if (cmp0 != FALSE) {
                                                cmp= cmp0;
                                        }
@@ -1486,7 +1502,7 @@ public class ASTManager implements IDisposable {
                 for (int i = 0; !isAboveOrEqual && i<newBindingsAboverOrEqual.length; i++) {
                     IBinding aboveBinding = newBindingsAboverOrEqual[i];
                     try {
-                        if (isSameBinding(aboveBinding, conflictingBinding) == TRUE) {
+                        if (isSameBinding(tu.getIndex(), aboveBinding, conflictingBinding) == TRUE) {
                             isAboveOrEqual= true;
                         }
                     } catch (DOMException e) {
index 96e57d0..ff9eee6 100644 (file)
@@ -6,7 +6,7 @@
  * http://www.eclipse.org/legal/epl-v10.html  
  * 
  * Contributors: 
- *    Markus Schorn - initial API and implementation 
+ *     Markus Schorn - initial API and implementation 
  ******************************************************************************/ 
 package org.eclipse.cdt.internal.ui.refactoring.rename;
 
@@ -39,8 +39,8 @@ import org.eclipse.cdt.ui.CUIPlugin;
  * can be calculated from the AST.
  */
 public class CRefactoringArgument {
-    private int fOffset= 0;
-    private int fLength= 0;
+    private int fOffset;
+    private int fLength;
     private String fText= ""; //$NON-NLS-1$
     private int fKind= CRefactory.ARGUMENT_UNKNOWN;
     private IFile fFile;
@@ -72,22 +72,18 @@ public class CRefactoringArgument {
         }
     }
         
-    // overrider
     public String getName() {
         return fText;
     }
 
-    // overrider
     public IFile getSourceFile() {
         return fFile;
     }
 
-    // overrider
     public int getArgumentKind() {
         return fKind;
     }
 
-    // overrider
     public int getOffset() {
         return fOffset;
     }
index e0514e8..3bbcfce 100644 (file)
@@ -6,8 +6,8 @@
  * http://www.eclipse.org/legal/epl-v10.html  
  * 
  * Contributors: 
- *    Markus Schorn - initial API and implementation
- *    Sergey Prigogin (Google)
+ *     Markus Schorn - initial API and implementation
+ *     Sergey Prigogin (Google)
  ******************************************************************************/ 
 package org.eclipse.cdt.internal.ui.refactoring.rename;
 
@@ -18,8 +18,6 @@ import java.util.Iterator;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.content.IContentType;
 import org.eclipse.jface.text.ITextSelection;
@@ -29,24 +27,20 @@ import org.eclipse.ui.ide.IDE;
 import org.eclipse.cdt.core.CCorePlugin;
 import org.eclipse.cdt.core.model.ICElement;
 import org.eclipse.cdt.core.model.IWorkingCopy;
-import org.eclipse.cdt.ui.CUIPlugin;
-
-import org.eclipse.cdt.internal.ui.refactoring.RefactoringStarter;
 
 /**
  * Serves to launch the various refactorings.
  */
 public class CRefactory {
-    public static final int OPTION_ASK_SCOPE                                   = 0x01;
-    public static final int OPTION_IN_COMMENT                                  = 0x02;
-    public static final int OPTION_IN_STRING_LITERAL                   = 0x04;
-    public static final int OPTION_IN_INCLUDE_DIRECTIVE                = 0x08;
-    public static final int OPTION_IN_MACRO_DEFINITION                         = 0x10;
-    public static final int OPTION_IN_PREPROCESSOR_DIRECTIVE   = 0x20;
-    public static final int OPTION_IN_INACTIVE_CODE                    = 0x40;
-    public static final int OPTION_IN_CODE                                             = 0x80;
-    public static final int OPTION_DO_VIRTUAL                                  = 0x100;
-    public static final int OPTION_EXHAUSTIVE_FILE_SEARCH              = 0x200;
+    public static final int OPTION_IN_CODE_REFERENCES                  = 0x01;
+    public static final int OPTION_IN_INACTIVE_CODE                    = 0x02;
+    public static final int OPTION_IN_COMMENT                                  = 0x04;
+    public static final int OPTION_IN_STRING_LITERAL                   = 0x08;
+    public static final int OPTION_IN_INCLUDE_DIRECTIVE                = 0x10;
+    public static final int OPTION_IN_MACRO_DEFINITION                         = 0x20;
+    public static final int OPTION_IN_PREPROCESSOR_DIRECTIVE   = 0x40;
+    public static final int OPTION_DO_VIRTUAL                                  = 0x80;
+    public static final int OPTION_EXHAUSTIVE_FILE_SEARCH              = 0x100;
 
     public static final int ARGUMENT_UNKNOWN                           =  0;
     public static final int ARGUMENT_LOCAL_VAR                         =  1;
@@ -64,7 +58,7 @@ public class CRefactory {
     public static final int ARGUMENT_ENUMERATOR             = 13;
     public static final int ARGUMENT_CLASS_TYPE             = 14;
     public static final int ARGUMENT_NAMESPACE              = 15;
-    
+
     private static CRefactory sInstance= new CRefactory();
     private TextSearchWrapper fTextSearch;
     
@@ -83,7 +77,7 @@ public class CRefactory {
         CRefactoringArgument iarg= new CRefactoringArgument(arg);
         final CRenameProcessor processor = new CRenameProcessor(this, iarg);
                CRenameRefactoring refactoring= new CRenameRefactoring(processor);
-        openDialog(shell, refactoring, false);
+        RenameSupport.openDialog(shell, refactoring);
     }
     
        public void rename(Shell shell, IWorkingCopy workingCopy, ITextSelection selection) {
@@ -98,51 +92,7 @@ public class CRefactory {
                new CRefactoringArgument((IFile) res, selection.getOffset(), selection.getLength());
         final CRenameProcessor processor = new CRenameProcessor(this, iarg);
                CRenameRefactoring refactoring= new CRenameRefactoring(processor);
-        openDialog(shell, refactoring, false);
-       }
-
-       /**
-        * Opens the refactoring dialog.
-        *
-        * <p>
-        * This method has to be called from within the UI thread.
-        * </p>
-        *
-        * @param shell a shell used as a parent for the refactoring, preview, or error dialog
-        * @param showPreviewOnly if <code>true</code>, the dialog skips all user input pages and
-        * directly shows the preview or error page. Otherwise, shows all pages.
-        * @return <code>true</code> if the refactoring has been executed successfully,
-        * or <code>false</code> if it has been canceled.
-        */
-       static boolean openDialog(Shell shell, CRenameRefactoring refactoring, boolean showPreviewOnly) {
-               try {
-               CRenameRefactoringWizard wizard;
-               if (!showPreviewOnly) {
-                       wizard = new CRenameRefactoringWizard(refactoring);
-               } else {
-                       wizard = new CRenameRefactoringWizard(refactoring) {
-                               @Override
-                                       protected void addUserInputPages() {
-                                       // nothing to add
-                               }
-                       };
-                       wizard.setForcePreviewReview(showPreviewOnly);
-               }
-               RefactoringStarter starter = new RefactoringStarter();
-                       CRenameProcessor processor = (CRenameProcessor) refactoring.getProcessor();
-               processor.lockIndex();
-               try {
-                       processor.checkInitialConditions(new NullProgressMonitor());
-                       return starter.activate(wizard, shell, RenameMessages.CRefactory_title_rename, processor.getSaveMode());
-               } finally {
-                       processor.unlockIndex();
-               }
-        } catch (InterruptedException e) {
-                       Thread.currentThread().interrupt();
-        } catch (CoreException e) {
-               CUIPlugin.log(e);
-               }
-        return false;
+        RenameSupport.openDialog(shell, refactoring);
        }
 
     public TextSearchWrapper getTextSearch() {
@@ -156,19 +106,19 @@ public class CRefactory {
         IContentType[] cts= Platform.getContentTypeManager().getAllContentTypes();
         HashSet<String> all= new HashSet<String>();
         for (IContentType type : cts) {
-            boolean useit= false;
-            while (!useit && type != null) {
+            boolean useIt= false;
+            while (!useIt && type != null) {
                 String id= type.getId();
                 if (id.equals(CCorePlugin.CONTENT_TYPE_CHEADER) ||
                         id.equals(CCorePlugin.CONTENT_TYPE_CSOURCE) ||
                         id.equals(CCorePlugin.CONTENT_TYPE_CXXHEADER) ||
                         id.equals(CCorePlugin.CONTENT_TYPE_CXXSOURCE)) {
-                       useit= true;
+                       useIt= true;
                 } else {
                     type= type.getBaseType();
                 }
             }
-            if (useit) {
+            if (useIt) {
                 String exts[] = type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC);
                 all.addAll(Arrays.asList(exts));
             }
index ccc62c5..b12b756 100644 (file)
@@ -13,7 +13,6 @@ package org.eclipse.cdt.internal.ui.refactoring.rename;
 
 import org.eclipse.cdt.internal.ui.refactoring.RefactoringSaveHelper;
 
-
 /**
  * Rename processor that sets up the input page for renaming a global entity.
  */
@@ -21,11 +20,11 @@ public class CRenameGlobalProcessor extends CRenameProcessorDelegate {
 
     public CRenameGlobalProcessor(CRenameProcessor processor, String name) {
         super(processor, name);
-        setAvailableOptions(CRefactory.OPTION_ASK_SCOPE |
-                       CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH |
-                CRefactory.OPTION_IN_CODE |
+        setAvailableOptions(
+                       CRefactory.OPTION_IN_CODE_REFERENCES |
                 CRefactory.OPTION_IN_COMMENT | 
-                CRefactory.OPTION_IN_MACRO_DEFINITION);
+                CRefactory.OPTION_IN_MACRO_DEFINITION |
+                CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH);
     }
 
        @Override
index 3ebe3d1..65eb58d 100644 (file)
@@ -20,12 +20,12 @@ public class CRenameIncludeProcessor extends CRenameProcessorDelegate {
     
     public CRenameIncludeProcessor(CRenameProcessor input, String kind) {
         super(input, kind);
-        setAvailableOptions(CRefactory.OPTION_ASK_SCOPE | 
-                       CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH |
+        setAvailableOptions( 
                 CRefactory.OPTION_IN_COMMENT | 
-                CRefactory.OPTION_IN_MACRO_DEFINITION);
+                CRefactory.OPTION_IN_MACRO_DEFINITION |
+                       CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH);
         setOptionsForcingPreview(-1);
-        setOptionsEnablingScope(-1);
+        setOptionsEnablingExhaustiveSearch(-1);
     }
 
     @Override
index 6baeebd..dee0b02 100644 (file)
@@ -40,13 +40,11 @@ public class CRenameLocalProcessor extends CRenameProcessorDelegate {
         setOptionsForcingPreview(0);
     }
     
-    // overrider
     @Override
        protected int getAcceptedLocations(int selectedOptions) {
-        return CRefactory.OPTION_IN_CODE | CRefactory.OPTION_IN_MACRO_DEFINITION | selectedOptions;
+        return CRefactory.OPTION_IN_CODE_REFERENCES | CRefactory.OPTION_IN_MACRO_DEFINITION | selectedOptions;
     }
     
-    // overrider
     @Override
        protected int getSearchScope() {
         return TextSearchWrapper.SCOPE_FILE;
index 3bebc37..c71e7e1 100644 (file)
@@ -26,13 +26,13 @@ public class CRenameMacroProcessor extends CRenameGlobalProcessor {
 
     public CRenameMacroProcessor(CRenameProcessor processor, String name) {
         super(processor, name);
-        setAvailableOptions(CRefactory.OPTION_ASK_SCOPE | 
-                       CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH |
-                CRefactory.OPTION_IN_CODE |
+        setAvailableOptions(
+                       CRefactory.OPTION_IN_CODE_REFERENCES |
                 CRefactory.OPTION_IN_COMMENT | 
-                CRefactory.OPTION_IN_PREPROCESSOR_DIRECTIVE);
+                CRefactory.OPTION_IN_PREPROCESSOR_DIRECTIVE |
+                CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH);
     }
-    
+
     @Override
        protected int getAcceptedLocations(int selectedOptions) {
         return selectedOptions | CRefactory.OPTION_IN_MACRO_DEFINITION;
index 2b9c0b5..2bb5bb1 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2004, 2010 Wind River Systems, Inc. and others.
+ * Copyright (c) 2004, 2011 Wind River Systems, Inc. and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -42,6 +42,8 @@ import org.eclipse.cdt.core.index.IIndex;
 import org.eclipse.cdt.core.model.CoreModel;
 import org.eclipse.cdt.core.model.ICProject;
 
+import org.eclipse.cdt.internal.ui.refactoring.RefactoringSaveHelper;
+
 /**
  * This is the processor used for the rename. It decides which of the delegates to
  * use and forwards further calls to the delegate.
@@ -52,13 +54,16 @@ public class CRenameProcessor extends RenameProcessor {
     private final CRefactoringArgument fArgument;
     private CRenameProcessorDelegate fDelegate;
     private String fReplacementText;
-    private String fWorkingSet;
-    private int fScope;
+    private String fWorkingSetName;
+    private int fExhaustiveSearchScope;
     private int fSelectedOptions;
     private final CRefactory fManager;
     private final ASTManager fAstManager;
        private IIndex fIndex;
+       private int indexLockCount;
        private RefactoringStatus fInitialConditionsStatus;
+
+       private Change fChange;
     
     public CRenameProcessor(CRefactory refactoringManager, CRefactoringArgument arg) {
         fManager= refactoringManager;
@@ -70,13 +75,11 @@ public class CRenameProcessor extends RenameProcessor {
         return fArgument;
     }
 
-    // overrider
     @Override
        public Object[] getElements() {
         return new Object[] { fArgument.getBinding() };
     }
 
-    // overrider
     @Override
        public String getProcessorName() {
         String result= null;
@@ -139,15 +142,15 @@ public class CRenameProcessor extends RenameProcessor {
     private CRenameProcessorDelegate createDelegate() {
         switch (fArgument.getArgumentKind()) {
                case CRefactory.ARGUMENT_LOCAL_VAR: 
-                return new CRenameLocalProcessor(this, 
+                return new CRenameLocalProcessor(this,
                         RenameMessages.CRenameTopProcessor_localVar,
                         fArgument.getScope());
                case CRefactory.ARGUMENT_PARAMETER:
-                return new CRenameLocalProcessor(this, 
+                return new CRenameLocalProcessor(this,
                         RenameMessages.CRenameTopProcessor_parameter,
                         fArgument.getScope());
                case CRefactory.ARGUMENT_FILE_LOCAL_VAR:
-                return new CRenameLocalProcessor(this, 
+                return new CRenameLocalProcessor(this,
                         RenameMessages.CRenameTopProcessor_filelocalVar,
                         null);
                case CRefactory.ARGUMENT_GLOBAL_VAR:
@@ -157,7 +160,7 @@ public class CRenameProcessor extends RenameProcessor {
                case CRefactory.ARGUMENT_FIELD:
                 return new CRenameGlobalProcessor(this, RenameMessages.CRenameTopProcessor_field);
                case CRefactory.ARGUMENT_FILE_LOCAL_FUNCTION:
-                return new CRenameLocalProcessor(this, 
+                return new CRenameLocalProcessor(this,
                         RenameMessages.CRenameTopProcessor_filelocalFunction,
                         null);
                case CRefactory.ARGUMENT_GLOBAL_FUNCTION:
@@ -189,10 +192,18 @@ public class CRenameProcessor extends RenameProcessor {
 
     @Override
        public Change createChange(IProgressMonitor pm) throws CoreException, OperationCanceledException {
-        return fDelegate.createChange(pm);
+        fChange = fDelegate.createChange(pm);
+        return fChange;
     }
 
-    @Override
+    /**
+     * @return the change if it has been created, or <code>null</code> otherwise.
+     */
+       Change getChange() {
+        return fChange;
+    }
+
+       @Override
        public RefactoringParticipant[] loadParticipants(RefactoringStatus status,
             SharableParticipants sharedParticipants) throws CoreException {
         RenameArguments arguments= new RenameArguments(getReplacementText(), true);
@@ -206,7 +217,9 @@ public class CRenameProcessor extends RenameProcessor {
         return result.toArray(new RefactoringParticipant[result.size()]);
     }
 
-    // options for the input page in the refactoring wizard
+    /**
+     * Options for the input page in the refactoring wizard
+     */
     public int getAvailableOptions() {
         if (fDelegate == null) {
             return 0;
@@ -214,7 +227,9 @@ public class CRenameProcessor extends RenameProcessor {
         return fDelegate.getAvailableOptions();
     }
 
-    // options for the input page that trigger the preview
+    /**
+     * Options for the input page that trigger the preview
+     */
     public int getOptionsForcingPreview() {
         if (fDelegate == null) {
             return 0;
@@ -222,12 +237,16 @@ public class CRenameProcessor extends RenameProcessor {
         return fDelegate.getOptionsForcingPreview();
     }
 
-    // options for the input page that trigger the preview
-    public int getOptionsEnablingScope() {
+    /**
+     * The options that may need exhaustive file search since index lookup is not guaranteed to
+     * return all files participating in refactoring. When one of these options is selected,
+     * the exhaustive file search is enabled.
+     */
+    public int getOptionsEnablingExhaustiveSearch() {
         if (fDelegate == null) {
             return 0;
         }
-        return fDelegate.getOptionsEnablingScope();
+        return fDelegate.getOptionsEnablingExhaustiveSearch();
     }
 
     @Override
@@ -235,12 +254,13 @@ public class CRenameProcessor extends RenameProcessor {
         return IDENTIFIER;
     }
 
-    public int getScope() {
-        return fScope;
+    public int getExhaustiveSearchScope() {
+        return (fSelectedOptions & CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH) != 0 ?
+                       fExhaustiveSearchScope : TextSearchWrapper.SCOPE_FILE;
     }
 
-    public void setScope(int scope) {
-        fScope = scope;
+    public void setExhaustiveSearchScope(int scope) {
+        fExhaustiveSearchScope = scope;
     }
 
     public int getSelectedOptions() {
@@ -251,16 +271,20 @@ public class CRenameProcessor extends RenameProcessor {
         fSelectedOptions = selectedOptions;
     }
 
-    public String getWorkingSet() {
-        return fWorkingSet;
+    public boolean isPreviewRequired() {
+       return (fSelectedOptions & getOptionsForcingPreview()) != 0;
+    }
+
+    public String getWorkingSetName() {
+        return fWorkingSetName;
     }
 
     /**
      * Sets the name of the working set. If the name of the working set is invalid,
      * it's set to an empty string. 
      */
-    public void setWorkingSet(String workingSet) {
-        fWorkingSet = checkWorkingSet(workingSet);
+    public void setWorkingSetName(String workingSet) {
+        fWorkingSetName = checkWorkingSet(workingSet);
     }
 
     public String getReplacementText() {
@@ -280,21 +304,26 @@ public class CRenameProcessor extends RenameProcessor {
     }
 
        public void lockIndex() throws CoreException, InterruptedException {
-               if (fIndex == null) {
-                       ICProject[] projects= CoreModel.getDefault().getCModel().getCProjects();
-                       fIndex= CCorePlugin.getIndexManager().getIndex(projects);
+               if (indexLockCount == 0) {
+                       if (fIndex == null) {
+                               ICProject[] projects= CoreModel.getDefault().getCModel().getCProjects();
+                               fIndex= CCorePlugin.getIndexManager().getIndex(projects);
+                       }
+                       fIndex.acquireReadLock();
                }
-               fIndex.acquireReadLock();
+               indexLockCount++;
        }
        
        public void unlockIndex() {
-               if (fAstManager != null) {
-                       fAstManager.dispose();
+               if (--indexLockCount <= 0) {
+                       if (fAstManager != null) {
+                               fAstManager.dispose();
+                       }
+                       if (fIndex != null) {
+                               fIndex.releaseReadLock();
+                       }
+                       fIndex= null;
                }
-               if (fIndex != null) {
-                       fIndex.releaseReadLock();
-               }
-               fIndex= null;
        }
 
        public IIndex getIndex() {
@@ -305,9 +334,12 @@ public class CRenameProcessor extends RenameProcessor {
         * @return a save mode from {@link org.eclipse.cdt.internal.ui.refactoring.RefactoringSaveHelper}
         */
        public int getSaveMode() {
+               if (fDelegate == null) {
+                       return RefactoringSaveHelper.SAVE_NOTHING;
+               }
                return fDelegate.getSaveMode();
        }
-       
+
     private String checkWorkingSet(String workingSet) {
                if (workingSet != null && workingSet.length() > 0) {
                    IWorkingSetManager wsManager= PlatformUI.getWorkbench().getWorkingSetManager();
index 4d7fd99..f88b03f 100644 (file)
@@ -47,7 +47,6 @@ import org.eclipse.cdt.core.index.IIndexFileLocation;
 import org.eclipse.cdt.core.index.IIndexName;
 import org.eclipse.cdt.ui.refactoring.CTextFileChange;
 
-
 /**
  * Abstract base for all different rename processors used by the top processor.
  */
@@ -55,23 +54,21 @@ public abstract class CRenameProcessorDelegate {
     private CRenameProcessor fTopProcessor;
     private ArrayList<CRefactoringMatch> fMatches;
     protected String fProcessorBaseName;
-    private int fAvailableOptions=         
-               CRefactory.OPTION_ASK_SCOPE | 
-               CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH | 
-               CRefactory.OPTION_IN_CODE |
+    private int fAvailableOptions=
+               CRefactory.OPTION_IN_CODE_REFERENCES |
                CRefactory.OPTION_IN_COMMENT | 
                CRefactory.OPTION_IN_MACRO_DEFINITION |
-               CRefactory.OPTION_IN_STRING_LITERAL;
+               CRefactory.OPTION_IN_STRING_LITERAL |
+               CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH; 
 
     private int fOptionsForcingPreview=
-               CRefactory.OPTION_IN_INACTIVE_CODE |
-               CRefactory.OPTION_IN_COMMENT | 
+               CRefactory.OPTION_IN_COMMENT | 
                CRefactory.OPTION_IN_MACRO_DEFINITION |
                CRefactory.OPTION_IN_PREPROCESSOR_DIRECTIVE |
                CRefactory.OPTION_IN_STRING_LITERAL;
-    
-    private int fOptionsEnablingScope= fOptionsForcingPreview;        
 
+    private int fOptionsEnablingExhaustiveSearch= fOptionsForcingPreview |
+               CRefactory.OPTION_IN_INACTIVE_CODE | CRefactory.OPTION_IN_CODE_REFERENCES;
 
     protected CRenameProcessorDelegate(CRenameProcessor topProcessor, String name) {
         fTopProcessor= topProcessor;
@@ -87,7 +84,7 @@ public abstract class CRenameProcessorDelegate {
     }
 
     final public int getSelectedScope() {
-        return fTopProcessor.getScope();
+        return fTopProcessor.getExhaustiveSearchScope();
     }
 
     final public int getSelectedOptions() {
@@ -95,7 +92,7 @@ public abstract class CRenameProcessorDelegate {
     }
 
     final public String getSelectedWorkingSet() {
-        return fTopProcessor.getWorkingSet();
+        return fTopProcessor.getWorkingSetName();
     }
 
     final public CRefactory getManager() {
@@ -142,15 +139,20 @@ public abstract class CRenameProcessorDelegate {
     }
 
     /**
-     * The options that need the scope definition. When one of them is 
-     * selected, the scope options are enabled.
+     * Sets the options that enable exhaustive file search.
+     * @see #getOptionsEnablingExhaustiveSearch()
      */
-    public void setOptionsEnablingScope(int options) {
-        fOptionsEnablingScope= options;
+    void setOptionsEnablingExhaustiveSearch(int options) {
+        fOptionsEnablingExhaustiveSearch= options;
     }
-    
-    final int getOptionsEnablingScope() {
-        return fOptionsEnablingScope;
+
+    /**
+     * The options that may need exhaustive file search since index lookup is not guaranteed to
+     * return all files participating in refactoring. When one of these options is selected,
+     * the exhaustive file search is enabled.
+     */
+    final int getOptionsEnablingExhaustiveSearch() {
+        return fOptionsEnablingExhaustiveSearch;
     }
 
     protected int getSearchScope() {
@@ -159,17 +161,15 @@ public abstract class CRenameProcessorDelegate {
 
     /**
      * Builds an index-based file filter for the name search.
+     * 
      * @param bindings bindings being renamed
-     * @return A set of files containing references to the bindings, or <code>null</code> if
-     * exhaustive file search is requested.
+     * @return A set of files containing references to the bindings.
      */
-    private Collection<IResource> getFileFilter(IBinding[] bindings) {
-       if ((getSelectedOptions() & CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH) != 0) {
-               return null;
-       }
+    private Collection<IFile> getReferringFiles(IBinding[] bindings) {
+               ArrayList<IFile> files = new ArrayList<IFile>();
        IIndex index = getIndex();
        if (index == null) {
-               return null;
+               return files;
        }
                Set<IIndexFileLocation> locations = new HashSet<IIndexFileLocation>();
        try {
@@ -182,21 +182,21 @@ public abstract class CRenameProcessorDelegate {
                                }
                }
                } catch (InterruptedException e) {
-                       return null;
+                       return files;
                } catch (CoreException e) {
-                       return null;
+                       return files;
                } finally {
                index.releaseReadLock();
        }
 
-               ArrayList<IResource> files = new ArrayList<IResource>(locations.size());
+       files.ensureCapacity(locations.size());
                IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
                for (IIndexFileLocation location : locations) {
                        String fullPath= location.getFullPath();
                        if (fullPath != null) {
                                IResource file= workspaceRoot.findMember(fullPath);
-                               if (file != null) {
-                                       files.add(file);
+                               if (file instanceof IFile) {
+                                       files.add((IFile) file);
                                }
                        }
                }
@@ -220,13 +220,12 @@ public abstract class CRenameProcessorDelegate {
         // perform text-search
         fMatches= new ArrayList<CRefactoringMatch>();
         TextSearchWrapper txtSearch= getManager().getTextSearch();
-        Collection<IResource> fileFilter = getFileFilter(renameBindings);
-        if (fileFilter != null && !fileFilter.contains(file)) {
-               fileFilter.add(file);
+        Collection<IFile> filesToSearch = getReferringFiles(renameBindings);
+        if (!filesToSearch.contains(file)) {
+               filesToSearch.add(file);
         }
-        IStatus stat= txtSearch.searchWord(getSearchScope(), file, getSelectedWorkingSet(), 
-                       fileFilter != null ? fileFilter.toArray(new IResource[fileFilter.size()]) : null,
-                       getManager().getCCppPatterns(),
+        IStatus stat= txtSearch.searchWord(filesToSearch.toArray(new IFile[filesToSearch.size()]),
+                       getSearchScope(), file, getSelectedWorkingSet(), getManager().getCCppPatterns(),
                        getArgument().getName(), new SubProgressMonitor(monitor, 1), fMatches);
         if (monitor.isCanceled()) {
             throw new OperationCanceledException();
@@ -354,7 +353,7 @@ public abstract class CRenameProcessorDelegate {
             }
             if (match.getAstInformation() != CRefactoringMatch.AST_REFERENCE_OTHER) {
                 IFile mfile= match.getFile();
-                if (file==null || !file.equals(mfile) || fileEdit == null || fileChange == null) {
+                if (file == null || !file.equals(mfile) || fileEdit == null || fileChange == null) {
                     file= mfile;
                     fileEdit= new MultiTextEdit();
                     fileChange = new CTextFileChange(file.getName(), file);
index b875cf2..4ff71ad 100644 (file)
@@ -6,9 +6,9 @@
  * http://www.eclipse.org/legal/epl-v10.html  
  * 
  * Contributors: 
- *    Markus Schorn - initial API and implementation 
- *    Emanuel Graf (Institute for Software, HSR Hochschule fuer Technik)
- *    Sergey Prigogin (Google)
+ *     Markus Schorn - initial API and implementation 
+ *     Emanuel Graf (Institute for Software, HSR Hochschule fuer Technik)
+ *     Sergey Prigogin (Google)
  ******************************************************************************/ 
 package org.eclipse.cdt.internal.ui.refactoring.rename;
 
@@ -45,7 +45,7 @@ public class CRenameRefactoringInputPage extends UserInputWizardPage {
        private String fSearchString;
     private int fOptions;
     private int fForcePreviewOptions= 0;
-    private int fEnableScopeOptions;
+    private int fExhaustiveSearchEnablingOptions;
 
     private Text fNewName;
        private Button fDoVirtual;
@@ -79,7 +79,7 @@ public class CRenameRefactoringInputPage extends UserInputWizardPage {
         fSearchString= processor.getArgument().getName();
         fOptions= processor.getAvailableOptions();
         fForcePreviewOptions= processor.getOptionsForcingPreview();
-        fEnableScopeOptions= processor.getOptionsEnablingScope();
+        fExhaustiveSearchEnablingOptions= processor.getOptionsEnablingExhaustiveSearch();
         
         Composite top= new Composite(parent, SWT.NONE);
         initializeDialogUnits(top);
@@ -87,7 +87,7 @@ public class CRenameRefactoringInputPage extends UserInputWizardPage {
 
         top.setLayout(new GridLayout(2, false));
 
-        // new name
+        // New name
         Composite group= top;
         GridData gd;
         GridLayout gl;
@@ -95,7 +95,11 @@ public class CRenameRefactoringInputPage extends UserInputWizardPage {
         Label label= new Label(top, SWT.NONE);
         label.setText(RenameMessages.CRenameRefactoringInputPage_label_newName);
         fNewName= new Text(top, SWT.BORDER);
-        fNewName.setText(fSearchString);
+        String name = processor.getReplacementText();
+        if (name == null) {
+               name = fSearchString;
+        }
+               fNewName.setText(name);
         fNewName.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));        
         fNewName.selectAll();
         
@@ -106,52 +110,9 @@ public class CRenameRefactoringInputPage extends UserInputWizardPage {
                gd.horizontalSpan= 2;
         }
 
-        if (hasOption(CRefactory.OPTION_ASK_SCOPE)) {          
-            // Specify the scope.
-            skipLine(top);
-            label = new Label(top, SWT.NONE);
-            label.setText(RenameMessages.CRenameRefactoringInputPage_label_scope);
-            label.setLayoutData(gd= new GridData(GridData.FILL_HORIZONTAL));
-            gd.horizontalSpan= 2;
-            
-            group= new Composite(top, SWT.NONE);
-            group.setLayoutData(gd= new GridData(GridData.FILL_HORIZONTAL));
-            gd.horizontalSpan= 2;
-            group.setLayout(gl= new GridLayout(4, false));
-            gl.marginHeight= 0;
-            gl.marginLeft = gl.marginWidth;
-            gl.marginWidth = 0;
-
-            fWorkspace= new Button(group, SWT.RADIO);
-            fWorkspace.setText(RenameMessages.CRenameRefactoringInputPage_button_workspace);
-            fWorkspace.setLayoutData(gd= new GridData());
-            
-            fDependent= new Button(group, SWT.RADIO);
-            fDependent.setText(RenameMessages.CRenameRefactoringInputPage_button_relatedProjects);
-            fDependent.setLayoutData(gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-               gd.horizontalIndent= 8;
-
-            fSingle= new Button(group, SWT.RADIO);
-            fSingle.setText(RenameMessages.CRenameRefactoringInputPage_button_singleProject);
-            fSingle.setLayoutData(gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
-               gd.horizontalIndent= 8;
-               gd.horizontalSpan= 2;
-
-            fWorkingSet= new Button(group, SWT.RADIO);
-            fWorkingSet.setText(RenameMessages.CRenameRefactoringInputPage_button_workingSet);
-
-            fWorkingSetSpec= new Text(group, SWT.SINGLE|SWT.BORDER|SWT.READ_ONLY);
-            fWorkingSetSpec.setLayoutData(gd= new GridData(GridData.FILL_HORIZONTAL));
-               gd.horizontalIndent= 8;
-               gd.horizontalSpan= 2;
-            fWorkingSetButton= new Button(group, SWT.PUSH);
-            fWorkingSetButton.setText(RenameMessages.CRenameRefactoringInputPage_button_chooseWorkingSet);
-            setButtonLayoutData(fWorkingSetButton);
-        }
-
         boolean skippedLine= false;
         group= null;
-        if (hasOption(CRefactory.OPTION_IN_CODE)) {
+        if (hasOption(CRefactory.OPTION_IN_CODE_REFERENCES)) {
             group= createLabelAndGroup(group, skippedLine, top);
                fReferences= new Button(group, SWT.CHECK);
                fReferences.setText(RenameMessages.CRenameRefactoringInputPage_button_sourceCode);
@@ -194,7 +155,43 @@ public class CRenameRefactoringInputPage extends UserInputWizardPage {
             fExhausiveFileSearch.setLayoutData(gd= new GridData());
                gd.horizontalIndent= 5;
                gd.horizontalSpan= 2;
-       }
+
+               // Specify the scope.
+            group= new Composite(top, SWT.NONE);
+            group.setLayoutData(gd= new GridData(GridData.FILL_HORIZONTAL));
+            gd.horizontalSpan= 2;
+            gd.horizontalIndent= 16;
+            group.setLayout(gl= new GridLayout(4, false));
+            gl.marginHeight= 0;
+            gl.marginLeft = gl.marginWidth;
+            gl.marginWidth = 0;
+
+            fWorkspace= new Button(group, SWT.RADIO);
+            fWorkspace.setText(RenameMessages.CRenameRefactoringInputPage_button_workspace);
+            fWorkspace.setLayoutData(gd= new GridData());
+            
+            fDependent= new Button(group, SWT.RADIO);
+            fDependent.setText(RenameMessages.CRenameRefactoringInputPage_button_relatedProjects);
+            fDependent.setLayoutData(gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
+               gd.horizontalIndent= 8;
+
+            fSingle= new Button(group, SWT.RADIO);
+            fSingle.setText(RenameMessages.CRenameRefactoringInputPage_button_singleProject);
+            fSingle.setLayoutData(gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
+               gd.horizontalIndent= 8;
+               gd.horizontalSpan= 2;
+
+            fWorkingSet= new Button(group, SWT.RADIO);
+            fWorkingSet.setText(RenameMessages.CRenameRefactoringInputPage_button_workingSet);
+
+            fWorkingSetSpec= new Text(group, SWT.SINGLE|SWT.BORDER|SWT.READ_ONLY);
+            fWorkingSetSpec.setLayoutData(gd= new GridData(GridData.FILL_HORIZONTAL));
+               gd.horizontalIndent= 8;
+               gd.horizontalSpan= 2;
+            fWorkingSetButton= new Button(group, SWT.PUSH);
+            fWorkingSetButton.setText(RenameMessages.CRenameRefactoringInputPage_button_chooseWorkingSet);
+            setButtonLayoutData(fWorkingSetButton);
+        }
 
         Dialog.applyDialogFont(top);
         hookSelectionListeners();
@@ -283,7 +280,7 @@ public class CRenameRefactoringInputPage extends UserInputWizardPage {
     }
 
     protected void onSelectedScope(int scope) {
-        getRenameProcessor().setScope(scope);
+        getRenameProcessor().setExhaustiveSearchScope(scope);
         updateEnablement();
     }
 
@@ -328,11 +325,11 @@ public class CRenameRefactoringInputPage extends UserInputWizardPage {
                 fDependent.setSelection(true);
                 break;
             }
-            processor.setScope(scope);
+            processor.setExhaustiveSearchScope(scope);
        
             String workingSet= fPreferences.getWorkingSet();
-           processor.setWorkingSet(workingSet);  // CRenameProcessor validates the working set name.
-            fWorkingSetSpec.setText(processor.getWorkingSet());
+           processor.setWorkingSetName(workingSet);  // CRenameProcessor validates the working set name.
+            fWorkingSetSpec.setText(processor.getWorkingSetName());
         }
         
         if (fDoVirtual != null) {
@@ -343,40 +340,46 @@ public class CRenameRefactoringInputPage extends UserInputWizardPage {
             boolean val= !fPreferences.getBoolean(CRenameRefactoringPreferences.KEY_REFERENCES_INV);
             fReferences.setSelection(val);
         }
+        initOption(fInInactiveCode, CRenameRefactoringPreferences.KEY_INACTIVE);
         initOption(fInComment, CRenameRefactoringPreferences.KEY_COMMENT);
         initOption(fInString, CRenameRefactoringPreferences.KEY_STRING);
         initOption(fInInclude, CRenameRefactoringPreferences.KEY_INCLUDE);
         initOption(fInMacro, CRenameRefactoringPreferences.KEY_MACRO_DEFINITION);
         initOption(fInPreprocessor, CRenameRefactoringPreferences.KEY_PREPROCESSOR);
-        initOption(fInInactiveCode, CRenameRefactoringPreferences.KEY_INACTIVE);
         initOption(fExhausiveFileSearch, CRenameRefactoringPreferences.KEY_EXHAUSTIVE_FILE_SEARCH);
     }
 
     private int computeSelectedOptions() {
-        int options= 0;
-        options |= computeOption(fDoVirtual, CRefactory.OPTION_DO_VIRTUAL);
-        options |= computeOption(fReferences, CRefactory.OPTION_IN_CODE);
-        options |= computeOption(fInComment, CRefactory.OPTION_IN_COMMENT);
-        options |= computeOption(fInString, CRefactory.OPTION_IN_STRING_LITERAL);
-        options |= computeOption(fInInclude, CRefactory.OPTION_IN_INCLUDE_DIRECTIVE);
-        options |= computeOption(fInMacro, CRefactory.OPTION_IN_MACRO_DEFINITION);
-        options |= computeOption(fInPreprocessor, CRefactory.OPTION_IN_PREPROCESSOR_DIRECTIVE);
-        options |= computeOption(fInInactiveCode, CRefactory.OPTION_IN_INACTIVE_CODE);
-        options |= computeOption(fExhausiveFileSearch, CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH);
+        int options= fPreferences.getOptions();
+        options = updateOptions(options, fDoVirtual, CRefactory.OPTION_DO_VIRTUAL);
+        options = updateOptions(options, fInInactiveCode, CRefactory.OPTION_IN_INACTIVE_CODE);
+        options = updateOptions(options, fInComment, CRefactory.OPTION_IN_COMMENT);
+        options = updateOptions(options, fInString, CRefactory.OPTION_IN_STRING_LITERAL);
+        options = updateOptions(options, fInInclude, CRefactory.OPTION_IN_INCLUDE_DIRECTIVE);
+        options = updateOptions(options, fInMacro, CRefactory.OPTION_IN_MACRO_DEFINITION);
+        options = updateOptions(options, fInPreprocessor, CRefactory.OPTION_IN_PREPROCESSOR_DIRECTIVE);
+        options = updateOptions(options, fReferences, CRefactory.OPTION_IN_CODE_REFERENCES);
+        options = updateOptions(options, fExhausiveFileSearch, CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH);
         return options;
     }
 
-    private int computeOption(Button button, int option) {
-        if (button != null && button.getSelection()) {
-            return option;
+    private int updateOptions(int options, Button button, int optionMask) {
+        if (button == null)
+               return options;
+        if (button.getSelection()) {
+            return options | optionMask;
+        } else {
+               return options & ~optionMask;
         }
-        return 0;
     }
 
     private void initOption(Button button, String key) {
-        boolean val= false;
+       initOption(button, key, false);
+    }
+
+    private void initOption(Button button, String key, boolean defaultValue) {
         if (button != null) {
-            val= fPreferences.getBoolean(key);
+            boolean val= fPreferences.getBoolean(key, defaultValue);
             button.setSelection(val);
         }
     }
@@ -444,13 +447,13 @@ public class CRenameRefactoringInputPage extends UserInputWizardPage {
                            fDependent.setSelection(false);
                            fSingle.setSelection(false);
                            fWorkingSet.setSelection(true);
-                           processor.setScope(TextSearchWrapper.SCOPE_WORKING_SET);
+                           processor.setExhaustiveSearchScope(TextSearchWrapper.SCOPE_WORKING_SET);
                            wsName= ws.getName();
                        }
                }
            
-           processor.setWorkingSet(wsName);  // CRenameProcessor validates the working set name.
-               fWorkingSetSpec.setText(processor.getWorkingSet());
+           processor.setWorkingSetName(wsName);  // CRenameProcessor validates the working set name.
+               fWorkingSetSpec.setText(processor.getWorkingSetName());
            updateEnablement();
     }
 
@@ -469,22 +472,26 @@ public class CRenameRefactoringInputPage extends UserInputWizardPage {
     }
 
     protected void updateEnablement() {
-        boolean enable= fEnableScopeOptions == -1 ||
-                       (computeSelectedOptions() & fEnableScopeOptions) != 0;
-        
-        if (fWorkspace != null) {
-            fWorkspace.setEnabled(enable);
-            fDependent.setEnabled(enable);
-            fSingle.setEnabled(enable);
-
-            boolean enableSpec= false;
-            fWorkingSet.setEnabled(enable);
-            if (enable && fWorkingSet.getSelection()) {
-                enableSpec= true;
-            }
-            fWorkingSetSpec.setEnabled(enableSpec);
-            fWorkingSetButton.setEnabled(enable);
-        }
+       if (fExhausiveFileSearch != null) {
+               boolean enable= fExhaustiveSearchEnablingOptions == -1 ||
+                               (computeSelectedOptions() & fExhaustiveSearchEnablingOptions) != 0;
+       
+               fExhausiveFileSearch.setEnabled(enable);
+               enable = enable && fExhausiveFileSearch.getSelection();
+               if (fWorkspace != null) {
+                   fWorkspace.setEnabled(enable);
+                   fDependent.setEnabled(enable);
+                   fSingle.setEnabled(enable);
+       
+                   boolean enableSpec= false;
+                   fWorkingSet.setEnabled(enable);
+                   if (enable && fWorkingSet.getSelection()) {
+                       enableSpec= true;
+                   }
+                   fWorkingSetSpec.setEnabled(enableSpec);
+                   fWorkingSetButton.setEnabled(enable);
+               }
+       }
     }
     
     private CRenameProcessor getRenameProcessor() {
index 1aa3681..557d30c 100644 (file)
@@ -45,6 +45,11 @@ public class CRenameRefactoringPreferences {
                return fDialogSettings.getBoolean(key);
        }
 
+       public boolean getBoolean(String key, boolean defaultValue) {
+               String value = fDialogSettings.get(key);
+               return value != null ? Boolean.parseBoolean(value) : defaultValue;
+       }
+
        public void put(String key, int value) {
                fDialogSettings.put(key, value);
        }
@@ -74,7 +79,9 @@ public class CRenameRefactoringPreferences {
         if (!getBoolean(KEY_IGNORE_VIRTUAL))
                options |= CRefactory.OPTION_DO_VIRTUAL;
         if (!getBoolean(KEY_REFERENCES_INV))
-               options |= CRefactory.OPTION_IN_CODE;
+               options |= CRefactory.OPTION_IN_CODE_REFERENCES;
+        if (getBoolean(KEY_INACTIVE))
+               options |= CRefactory.OPTION_IN_INACTIVE_CODE;
         if (getBoolean(KEY_COMMENT))
                options |= CRefactory.OPTION_IN_COMMENT;
         if (getBoolean(KEY_STRING))
@@ -85,8 +92,6 @@ public class CRenameRefactoringPreferences {
                options |= CRefactory.OPTION_IN_MACRO_DEFINITION;
         if (getBoolean(KEY_PREPROCESSOR))
                options |= CRefactory.OPTION_IN_PREPROCESSOR_DIRECTIVE;
-        if (getBoolean(KEY_INACTIVE))
-               options |= CRefactory.OPTION_IN_INACTIVE_CODE;
         if (getBoolean(KEY_EXHAUSTIVE_FILE_SEARCH))
                options |= CRefactory.OPTION_EXHAUSTIVE_FILE_SEARCH;
         return options;
index a8e9592..dfb2d6e 100644 (file)
@@ -334,8 +334,7 @@ public class RenameLinkedMode {
                        if (fShowPreview) { // could have been updated by undoAndCreateRenameSupport(..)
                                executed= renameSupport.openDialog(shell, true);
                        } else {
-                               renameSupport.perform(shell, fEditor.getSite().getWorkbenchWindow());
-                               executed= true;
+                               executed= renameSupport.perform(shell, fEditor.getSite().getWorkbenchWindow());
                        }
                        if (executed) {
                                restoreFullSelection();
@@ -429,10 +428,9 @@ public class RenameLinkedMode {
         processor.setReplacementText(newName);
         CRenameRefactoringPreferences preferences = new CRenameRefactoringPreferences();
         processor.setSelectedOptions(preferences.getOptions());
-        processor.setScope(preferences.getScope());
-        processor.setWorkingSet(preferences.getWorkingSet());
-               RenameSupport renameSupport= RenameSupport.create(processor);
-               return renameSupport;
+        processor.setExhaustiveSearchScope(preferences.getScope());
+        processor.setWorkingSetName(preferences.getWorkingSet());
+               return RenameSupport.create(processor);
        }
 
        private void reconcile() throws CModelException {
index b4c6489..e570db8 100644 (file)
@@ -77,7 +77,6 @@ public class RenameMessages extends NLS {
        public static String CRenameRefactoringInputPage_button_workingSet;
        public static String CRenameRefactoringInputPage_errorInvalidIdentifier;
        public static String CRenameRefactoringInputPage_label_newName;
-       public static String CRenameRefactoringInputPage_label_scope;
        public static String CRenameRefactoringInputPage_label_updateWithin;
        public static String CRenameRefactoringInputPage_renameBaseAndDerivedMethods;
        public static String CRenameTopProcessor_enumerator;
index dcd80f1..e3c2785 100644 (file)
@@ -66,15 +66,14 @@ CRenameRefactoringInputPage_button_includes=Include directives
 CRenameRefactoringInputPage_button_macroDefinitions=Macro definitions
 CRenameRefactoringInputPage_button_preprocessor=Other preprocessor directives
 CRenameRefactoringInputPage_button_strings=String literals
-CRenameRefactoringInputPage_button_exhaustiveFileSearch=Exhaustive file search (slow)
+CRenameRefactoringInputPage_button_exhaustiveFileSearch=Exhaustive (slow) file search in:
 CRenameRefactoringInputPage_button_singleProject=Project
 CRenameRefactoringInputPage_button_relatedProjects=Related projects
 CRenameRefactoringInputPage_button_workspace=All projects
 CRenameRefactoringInputPage_button_workingSet=Working set:
 CRenameRefactoringInputPage_errorInvalidIdentifier=''{0}'' is not a valid identifier
 CRenameRefactoringInputPage_label_newName=New Name: 
-CRenameRefactoringInputPage_label_scope=Scope of Rename:
-CRenameRefactoringInputPage_label_updateWithin=Update within:
+CRenameRefactoringInputPage_label_updateWithin=Update occurrences in:
 CRenameRefactoringInputPage_renameBaseAndDerivedMethods=Rename virtual methods in base and derived classes, also (if any).
 CRenameTopProcessor_enumerator=enumerator
 CRenameTopProcessor_error_invalidName=The selected name cannot be renamed.
index e65517f..df25151 100644 (file)
@@ -13,19 +13,25 @@ package org.eclipse.cdt.internal.ui.refactoring.rename;
 
 import java.lang.reflect.InvocationTargetException;
 
+import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.ltk.core.refactoring.Change;
 import org.eclipse.ltk.core.refactoring.RefactoringCore;
 import org.eclipse.ltk.core.refactoring.RefactoringStatus;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
 
 import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.ui.CUIPlugin;
 
 import org.eclipse.cdt.internal.ui.refactoring.RefactoringExecutionHelper;
+import org.eclipse.cdt.internal.ui.refactoring.RefactoringStarter;
 
 /**
  * Central access point to execute rename refactorings.
@@ -49,6 +55,13 @@ public class RenameSupport {
        /** Flag indicating that the setter method is to be updated as well. */
        public static final int UPDATE_SETTER_METHOD= 1 << 5;
 
+    /** @see #openDialog(Shell, CRenameRefactoring, DialogMode) */
+    private enum DialogMode { ALL_PAGES, PREVIEW_ONLY, CONDITIONAL_PREVIEW }
+    /** @see #openDialog(Shell, CRenameRefactoring, DialogMode) */
+    private enum DialogResult { OK, CANCELED, SKIPPED }
+    // Same as org.eclipse.ltk.internal.ui.refactoring.IErrorWizardPage#PAGE_NAME
+    private static final String ERROR_PAGE_NAME = "ErrorPage"; //$NON-NLS-1$
+
        private CRenameRefactoring fRefactoring;
        private RefactoringStatus fPreCheckStatus;
 
@@ -67,7 +80,7 @@ public class RenameSupport {
         * @throws CoreException if an unexpected exception occurs while performing the checking.
         *
         * @see #openDialog(Shell)
-        * @see #perform(Shell, IRunnableContext)
+        * @see #perform(Shell, IWorkbenchWindow)
         */
        public IStatus preCheck() throws CoreException {
                ensureChecked();
@@ -80,14 +93,13 @@ public class RenameSupport {
        /**
         * Opens the refactoring dialog for this rename support.
         *
-        * @param parent a shell used as a parent for the refactoring dialog.
-        * @throws CoreException if an unexpected exception occurs while opening the
-        * dialog.
+        * @param shell a shell used as a parent for the refactoring dialog.
+        * @throws CoreException if an unexpected exception occurs while opening the dialog.
         *
         * @see #openDialog(Shell, boolean)
         */
-       public void openDialog(Shell parent) throws CoreException {
-               openDialog(parent, false);
+       public boolean openDialog(Shell shell) throws CoreException {
+        return openDialog(shell, false);
        }
 
        /**
@@ -116,7 +128,92 @@ public class RenameSupport {
                        return false;
                }
 
-        return CRefactory.openDialog(shell, fRefactoring, showPreviewOnly);
+               DialogMode mode = showPreviewOnly ?     DialogMode.PREVIEW_ONLY : DialogMode.ALL_PAGES; 
+        return openDialog(shell, fRefactoring, mode) == DialogResult.OK;
+       }
+
+       /**
+        * Opens the refactoring dialog for a given rename refactoring.
+        *
+        * @param shell a shell used as a parent for the refactoring dialog.
+        * @param refactoring the refactoring object.
+        *
+        * @see #openDialog(Shell, boolean)
+        */
+       public static void openDialog(Shell shell, CRenameRefactoring refactoring) {
+        openDialog(shell, refactoring, DialogMode.ALL_PAGES);
+       }
+
+       /**
+        * Opens the refactoring dialog.
+        *
+        * <p>
+        * This method has to be called from within the UI thread.
+        * </p>
+        *
+        * @param shell A shell used as a parent for the refactoring, preview, or error dialog
+        * @param refactoring The refactoring.
+        * @param mode One of DialogMode values. ALL_PAGES opens wizard with all pages shown;
+        *     PREVIEW_ONLY opens the preview page only; CONDITIONAL_PREVIEW opens the wizard with
+        *     preview page only and only if a warning was generated during the final conditions check.
+        * @return One of DialogResult values. OK is returned if the dialog was shown and
+        *     the refactoring change was applied; CANCELED is returned if the refactoring was
+        *     cancelled. SKIPPED is returned if the dialog was skipped in CONDITIONAL_PREVIEW mode and
+        *     the refactoring change has not been applied yet.
+        */
+       static DialogResult openDialog(Shell shell, CRenameRefactoring refactoring, final DialogMode mode) {
+               try {
+                       final boolean[] dialogSkipped = new boolean[1];
+               CRenameRefactoringWizard wizard;
+               if (mode == DialogMode.ALL_PAGES) {
+                       wizard = new CRenameRefactoringWizard(refactoring);
+               } else {
+                       wizard = new CRenameRefactoringWizard(refactoring) {
+                                       @Override
+                                       protected void addUserInputPages() {
+                                       // Nothing to add
+                               }
+
+                                       @Override
+                                       public IWizardPage getStartingPage() {
+                                               IWizardPage startingPage = super.getStartingPage();
+                                               if (mode == DialogMode.CONDITIONAL_PREVIEW &&
+                                                               !startingPage.getName().equals(ERROR_PAGE_NAME)) {
+                                                       dialogSkipped[0] = true;
+                                                       return null;
+                                               }
+                                               return startingPage;
+                                       }
+                       };
+                       wizard.setForcePreviewReview(mode != DialogMode.ALL_PAGES);
+               }
+               RefactoringStarter starter = new RefactoringStarter();
+                       CRenameProcessor processor = (CRenameProcessor) refactoring.getProcessor();
+               processor.lockIndex();
+               try {
+                       RefactoringStatus status = processor.checkInitialConditions(new NullProgressMonitor());
+                       if (status.hasFatalError()) {
+                                       showInformation(shell, status);
+                               return DialogResult.CANCELED;
+                       }
+                       if (starter.activate(wizard, shell, RenameMessages.CRefactory_title_rename,
+                                       processor.getSaveMode())) {
+                               return DialogResult.OK;
+                       }
+                       if (dialogSkipped[0]) {
+                               // If the dialog was not shown, it is our responsibility to close it.
+                               wizard.getContainer().getShell().close();
+                               return DialogResult.SKIPPED;
+                       }
+               } finally {
+                       processor.unlockIndex();
+               }
+        } catch (InterruptedException e) {
+                       Thread.currentThread().interrupt();
+        } catch (CoreException e) {
+               CUIPlugin.log(e);
+               }
+        return DialogResult.CANCELED;
        }
 
        /**
@@ -139,26 +236,38 @@ public class RenameSupport {
         * @see #openDialog(Shell)
         * @see IRunnableContext#run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
         */
-       public void perform(Shell parent, IRunnableContext context) throws InterruptedException, InvocationTargetException {
+       public boolean perform(Shell parent, IWorkbenchWindow context) throws InterruptedException, InvocationTargetException {
                try {
                        ensureChecked();
                        if (fPreCheckStatus.hasFatalError()) {
                                showInformation(parent, fPreCheckStatus);
-                               return;
+                               return false;
                        }
 
                        CRenameProcessor renameProcessor = getRenameProcessor();
+                       renameProcessor.lockIndex();
                        try {
-                               renameProcessor.lockIndex();
                                fPreCheckStatus = renameProcessor.checkInitialConditions(new NullProgressMonitor());
                                if (fPreCheckStatus.hasFatalError()) {
                                        showInformation(parent, fPreCheckStatus);
-                                       return;
+                                       return false;
+                               }
+                               DialogResult result = openDialog(context.getShell(), fRefactoring,
+                                               DialogMode.CONDITIONAL_PREVIEW);
+                               switch (result) {
+                               case OK:
+                                       return true;
+                               case SKIPPED:
+                                       RefactoringExecutionHelper helper= new RefactoringExecutionHelper(fRefactoring,
+                                                       RefactoringCore.getConditionCheckingFailedSeverity(),
+                                                       renameProcessor.getSaveMode(), parent, context);
+                                       Change change = renameProcessor.getChange();
+                                       Assert.isNotNull(change);
+                                       helper.performChange(change, true);
+                                       return true;
+                               default:
+                                       return false;
                                }
-                               RefactoringExecutionHelper helper= new RefactoringExecutionHelper(fRefactoring,
-                                               RefactoringCore.getConditionCheckingFailedSeverity(), renameProcessor.getSaveMode(),
-                                               parent, context);
-                               helper.perform(true, true);
                        } finally {
                                renameProcessor.unlockIndex();
                        }
@@ -197,7 +306,7 @@ public class RenameSupport {
                }
        }
 
-       private void showInformation(Shell parent, RefactoringStatus status) {
+       private static void showInformation(Shell parent, RefactoringStatus status) {
                String message= status.getMessageMatchingSeverity(RefactoringStatus.FATAL);
                MessageDialog.openInformation(parent, RenameMessages.RenameSupport_dialog_title, message);
        }
index 57af2ad..6c32f9e 100644 (file)
@@ -6,8 +6,8 @@
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- *    Markus Schorn - initial API and implementation
- *    Sergey Prigogin (Google)
+ *     Markus Schorn - initial API and implementation
+ *     Sergey Prigogin (Google)
  *******************************************************************************/
 package org.eclipse.cdt.internal.ui.refactoring.rename;
 
@@ -42,7 +42,6 @@ import org.eclipse.search.core.text.TextSearchMatchAccess;
 import org.eclipse.search.core.text.TextSearchRequestor;
 import org.eclipse.search.core.text.TextSearchScope;
 import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
 import org.eclipse.ui.PlatformUI;
 
 import org.eclipse.cdt.core.model.CoreModel;
@@ -65,28 +64,29 @@ public class TextSearchWrapper {
     public final static int SCOPE_WORKING_SET = 5;
 
     private static class SearchScope extends TextSearchScope {
-        public static SearchScope newSearchScope(IWorkingSet ws, IResource[] filter) {
+        public static SearchScope newSearchScope(IFile[] files, IWorkingSet ws) {
             IAdaptable[] adaptables= ws.getElements();
             ArrayList<IResource> resources = new ArrayList<IResource>();
             for (int i = 0; i < adaptables.length; i++) {
                 IAdaptable adaptable = adaptables[i];
-                IResource r= (IResource) adaptable.getAdapter(IResource.class);
-                if (r != null) {
-                    resources.add(r);
+                IResource resource= (IResource) adaptable.getAdapter(IResource.class);
+                if (resource != null) {
+                    resources.add(resource);
                 }
             }
-            return newSearchScope(resources.toArray(new IResource[resources.size()]), filter);
+            return newSearchScope(files, resources.toArray(new IResource[resources.size()]));
                }
         
-               public static SearchScope newSearchScope(IResource[] roots, IResource[] filter) {
-                       if (filter != null) {
-                               ArrayList<IResource> files = new ArrayList<IResource>(filter.length);
-                               for (IResource file : filter) {
-                                       if (isInForest(file, roots)) {
-                                               files.add(file);
+               public static SearchScope newSearchScope(IFile[] files, IResource[] roots) {
+                       if (files != null) {
+                               ArrayList<IResource> resources = new ArrayList<IResource>(files.length + roots.length);
+                               for (IFile file : files) {
+                                       if (!isInForest(file, roots)) {
+                                               resources.add(file);
                                        }
                                }
-                               roots = files.toArray(new IResource[files.size()]);
+                               Collections.addAll(resources, roots);
+                               roots = resources.toArray(new IResource[resources.size()]);
                        }
                        return new SearchScope(roots);
                }
@@ -181,93 +181,88 @@ public class TextSearchWrapper {
     public TextSearchWrapper() {
     }
     
-    private TextSearchScope createSearchScope(IFile file, int scope, String workingSetName,
-               IResource[] filter, String[] patterns) {
+    private TextSearchScope createSearchScope(IFile[] files, int scope, IFile file,
+               String workingSetName, String[] patterns) {
         switch (scope) {
                case SCOPE_WORKSPACE:
-                   return defineSearchScope(file.getWorkspace().getRoot(), filter, patterns);
+                   return defineSearchScope(files, file.getWorkspace().getRoot(), patterns);
                case SCOPE_SINGLE_PROJECT:
-                   return defineSearchScope(file.getProject(), filter, patterns);
+                   return defineSearchScope(files, file.getProject(), patterns);
                case SCOPE_FILE:
-                   return defineSearchScope(file, filter, patterns);
+                   return defineSearchScope(files, file, patterns);
                case SCOPE_WORKING_SET: {
-                   TextSearchScope result= defineWorkingSetAsSearchScope(workingSetName, filter, patterns);
-                   if (result == null) {
-                       result= defineSearchScope(file.getWorkspace().getRoot(), filter, patterns);
-                   }
-                       return result;
+                   return defineWorkingSetAsSearchScope(files, workingSetName, patterns);
                }
         }
-           return defineRelatedProjectsAsSearchScope(file.getProject(), filter, patterns);
+           return defineRelatedProjectsAsSearchScope(files, file.getProject(), patterns);
     }
     
-    private TextSearchScope defineRelatedProjectsAsSearchScope(IProject project, IResource[] filter, String[] patterns) {
+    private TextSearchScope defineRelatedProjectsAsSearchScope(IFile[] files, IProject project, String[] patterns) {
         HashSet<IProject> projects= new HashSet<IProject>();
         LinkedList<IProject> workThrough= new LinkedList<IProject>();
         workThrough.add(project);
         while (!workThrough.isEmpty()) {
-            IProject prj= workThrough.removeLast();
-            if (projects.add(prj)) {
+            IProject proj= workThrough.removeLast();
+            if (projects.add(proj)) {
                 try {
-                    workThrough.addAll(Arrays.asList(prj.getReferencedProjects()));
-                    workThrough.addAll(Arrays.asList(prj.getReferencingProjects()));
+                    workThrough.addAll(Arrays.asList(proj.getReferencedProjects()));
+                    workThrough.addAll(Arrays.asList(proj.getReferencingProjects()));
                 } catch (CoreException e) {
                     // need to ignore
                 }
             }
         }
         IResource[] roots= projects.toArray(new IResource[projects.size()]);
-        return defineSearchScope(roots, filter, patterns);
+        return defineSearchScope(files, roots, patterns);
     }
 
-    private TextSearchScope defineWorkingSetAsSearchScope(String workingSetName, IResource[] filter, String[] patterns) {
-        if (workingSetName == null) {
-            return null;
-        }
-               IWorkingSetManager wsManager= PlatformUI.getWorkbench().getWorkingSetManager();
-               IWorkingSet ws= wsManager.getWorkingSet(workingSetName);
-               if (ws == null) {
-                   return null;
-               }
-               SearchScope result= SearchScope.newSearchScope(ws, filter); 
+    private TextSearchScope defineWorkingSetAsSearchScope(IFile[] files, String workingSetName, String[] patterns) {
+       IWorkingSet workingSet = workingSetName != null ?
+               PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSet(workingSetName) :
+               null;   
+               SearchScope result= workingSet != null ?
+                               SearchScope.newSearchScope(files, workingSet) :
+                               SearchScope.newSearchScope(files, new IResource[0]);
                applyFilePatterns(result, patterns);
                return result;
     }
 
     private void applyFilePatterns(SearchScope scope, String[] patterns) {
-        for (int i = 0; i < patterns.length; i++) {
-            String pattern = patterns[i];
+        for (String pattern : patterns) {
             scope.addFileNamePattern(pattern);
         }
     }
 
-    private TextSearchScope defineSearchScope(IResource root, IResource[] filter, String[] patterns) {
-       SearchScope result= SearchScope.newSearchScope(new IResource[] { root }, filter); 
+    private TextSearchScope defineSearchScope(IFile[] files, IResource root, String[] patterns) {
+       SearchScope result= SearchScope.newSearchScope(files, new IResource[] { root }); 
         applyFilePatterns(result, patterns);
         return result;
     }
     
-    private TextSearchScope defineSearchScope(IResource[] roots, IResource[] filter, String[] patterns) {
-       SearchScope result= SearchScope.newSearchScope(roots, filter);           
+    private TextSearchScope defineSearchScope(IFile[] files, IResource[] roots, String[] patterns) {
+       SearchScope result= SearchScope.newSearchScope(files, roots);           
         applyFilePatterns(result, patterns);
         return result;
     }
     
     /**
      * Searches for a given word.
-     * 
-     * @param scope One of SCOPE_FILE, SCOPE_WORKSPACE, SCOPE_RELATED_PROJECTS, SCOPE_SINGLE_PROJECT,
-     *     or SCOPE_WORKING_SET.
-     * @param file The file used as an anchor for the scope.
-     * @param workingSet The name of a working set. Ignored is scope is not SCOPE_WORKING_SET.
-     * @param filter If not null, further limits the scope of the search.
+     *
+     * @param filesToSearch The files to search.
+     * @param scope Together with {@code file} and {@code workingSet} defines set of additional
+     *     file to search. One of SCOPE_FILE, SCOPE_WORKSPACE, SCOPE_RELATED_PROJECTS,
+     *     SCOPE_SINGLE_PROJECT, or SCOPE_WORKING_SET.
+     * @param scopeAnchor The file used as an anchor for the scope.
+     * @param workingSet The name of a working set. Ignored if {@code scope} is not
+     *     SCOPE_WORKING_SET.
      * @param patterns File name patterns.
      * @param word The word to search for.
      * @param monitor A progress monitor.
      * @param target The list that gets populated with search results.
      */
-    public IStatus searchWord(int scope, IFile file, String workingSet, IResource[] filter, String[] patterns,
-            String word, IProgressMonitor monitor, final List<CRefactoringMatch> target) {
+    public IStatus searchWord(IFile[] filesToSearch, int scope, IFile scopeAnchor, String workingSet,
+               String[] patterns, String word, IProgressMonitor monitor,
+               final List<CRefactoringMatch> target) {
         int startPos= target.size();
         TextSearchEngine engine= TextSearchEngine.create();
         StringBuilder searchPattern= new StringBuilder(word.length() + 8);
@@ -279,7 +274,7 @@ public class TextSearchWrapper {
 
         Pattern pattern= Pattern.compile(searchPattern.toString());
         
-        TextSearchScope searchscope= createSearchScope(file, scope, workingSet, filter, patterns);
+        TextSearchScope searchscope= createSearchScope(filesToSearch, scope, scopeAnchor, workingSet, patterns);
         TextSearchRequestor requestor= new TextSearchRequestor() {
             @Override
                        public boolean acceptPatternMatch(TextSearchMatchAccess access) {
@@ -360,7 +355,7 @@ public class TextSearchWrapper {
             Token token;
             int lastState= 0;
             while ((token= scanner.nextToken()) != null) {
-                int state= CRefactory.OPTION_IN_CODE;
+                int state= CRefactory.OPTION_IN_CODE_REFERENCES;
                 switch (token.getType()) {
                        case Token.tLINECOMMENT:
                     case Token.tBLOCKCOMMENT:
@@ -382,7 +377,7 @@ public class TextSearchWrapper {
                         break;
                 }
                 if (state != lastState) {
-                    locations.add(new int[] {token.getOffset(), state});
+                    locations.add(new int[] { token.getOffset(), state });
                     lastState= state;
                 }
             }
index 2502204..b863787 100644 (file)
@@ -7,7 +7,7 @@
  * http://www.eclipse.org/legal/epl-v10.html  
  *  
  * Contributors: 
- * Institute for Software - initial API and implementation
+ *     Institute for Software - initial API and implementation
  *******************************************************************************/
 package org.eclipse.cdt.internal.ui.refactoring.utils;
 
@@ -36,9 +36,7 @@ import org.eclipse.cdt.core.model.ICElement;
 import org.eclipse.cdt.internal.ui.editor.CEditor;
 
 /**
- * A collection of helper methods to interact with the 
- * workbench's IDocuments and IFiles
- *
+ * A collection of helper methods to interact with the workbench's IDocuments and IFiles
  */
 public class EclipseObjects {
        static public IWorkbenchPage getActivePage() {
index f1ee815..4e149bb 100644 (file)
@@ -71,8 +71,10 @@ import org.eclipse.cdt.core.index.IndexFilter;
 import org.eclipse.cdt.core.model.ICElement;
 import org.eclipse.cdt.core.model.ICProject;
 import org.eclipse.cdt.core.model.ILanguage;
+import org.eclipse.cdt.core.model.IMethodDeclaration;
 import org.eclipse.cdt.core.model.ISourceRange;
 import org.eclipse.cdt.core.model.ISourceReference;
+import org.eclipse.cdt.core.model.IStructureDeclaration;
 import org.eclipse.cdt.core.model.ITranslationUnit;
 import org.eclipse.cdt.core.parser.util.ArrayUtil;
 import org.eclipse.cdt.core.parser.util.CharArrayUtils;
@@ -487,13 +489,24 @@ class OpenDeclarationsJob extends Job implements ASTRunnable {
                                if (uniqueElements.size() == 1) {
                                        target= (ISourceReference) uniqueElements.get(0);
                                } else {
-                                       if (OpenDeclarationsAction.sIsJUnitTest) {
-                                               throw new RuntimeException("ambiguous input: " + uniqueElements.size()); //$NON-NLS-1$
+                                       if (uniqueElements.size() == 2) {
+                                               final ICElement e0 = uniqueElements.get(0);
+                                               final ICElement e1 = uniqueElements.get(1);
+                                               if (e0 instanceof IStructureDeclaration && e1 instanceof IMethodDeclaration) {
+                                                       target= (ISourceReference) e1;
+                                               } else if (e1 instanceof IStructureDeclaration && e0 instanceof IMethodDeclaration) {
+                                                       target= (ISourceReference) e0;
+                                               }
+                                       }
+                                       if (target == null) {
+                                               if (OpenDeclarationsAction.sIsJUnitTest) {
+                                                       throw new RuntimeException("ambiguous input: " + uniqueElements.size()); //$NON-NLS-1$
+                                               }
+                                               ICElement[] elemArray= uniqueElements.toArray(new ICElement[uniqueElements.size()]);
+                                               target = (ISourceReference) OpenActionUtil.selectCElement(elemArray, fAction.getSite().getShell(),
+                                                               CEditorMessages.OpenDeclarationsAction_dialog_title, CEditorMessages.OpenDeclarationsAction_selectMessage,
+                                                               CElementLabels.ALL_DEFAULT | CElementLabels.ALL_FULLY_QUALIFIED | CElementLabels.MF_POST_FILE_QUALIFIED, 0);
                                        }
-                                       ICElement[] elemArray= uniqueElements.toArray(new ICElement[uniqueElements.size()]);
-                                       target = (ISourceReference) OpenActionUtil.selectCElement(elemArray, fAction.getSite().getShell(),
-                                                       CEditorMessages.OpenDeclarationsAction_dialog_title, CEditorMessages.OpenDeclarationsAction_selectMessage,
-                                                       CElementLabels.ALL_DEFAULT | CElementLabels.ALL_FULLY_QUALIFIED | CElementLabels.MF_POST_FILE_QUALIFIED, 0);
                                }
                                if (target != null) {
                                        ITranslationUnit tu= target.getTranslationUnit();
index 8f6a551..9f7b0c1 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -44,6 +44,8 @@ import org.eclipse.swt.widgets.Shell;
 import org.eclipse.cdt.ui.CUIPlugin;
 import org.eclipse.cdt.ui.PreferenceConstants;
 
+import org.eclipse.cdt.internal.ui.text.c.hover.SourceViewerInformationControl;
+
 /**
  * Abstract class for "quick" compare views in light-weight controls.
  *
@@ -75,7 +77,7 @@ public abstract class AbstractCompareViewerInformationControl extends org.eclips
        private ICompareInput fCompareInput;
 
        private Color fBackgroundColor;
-       private boolean fIsSystemBackgroundColor;
+       private boolean fIsSystemBackgroundColor = true;
 
        private Label fTitleLabel;
 
@@ -106,7 +108,13 @@ public abstract class AbstractCompareViewerInformationControl extends org.eclips
        }
 
        private void initializeColors() {
-               RGB bgRGB= getHoverBackgroundColorRGB();
+               IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+               RGB bgRGB;
+               if (store.getBoolean(PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT)) {
+                       bgRGB= SourceViewerInformationControl.getVisibleBackgroundColor(getShell().getDisplay());
+               } else {
+                       bgRGB= PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR);
+               }
                if (bgRGB != null) {
                        fBackgroundColor= new Color(getShell().getDisplay(), bgRGB);
                        fIsSystemBackgroundColor= false;
@@ -116,13 +124,6 @@ public abstract class AbstractCompareViewerInformationControl extends org.eclips
                }
        }
        
-       private RGB getHoverBackgroundColorRGB() {
-               IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
-               return store.getBoolean(PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT)
-                       ? null
-                       : PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR);
-       }
-
        @Override
        protected void createContent(Composite parent) {
                initializeColors();
@@ -207,6 +208,10 @@ public abstract class AbstractCompareViewerInformationControl extends org.eclips
                return false;
        }
 
+       protected Color getBackgroundColor() {
+               return fBackgroundColor;
+       }
+
        @Override
        public void setInformation(String content) {
        }
index 5a379c0..6004d98 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2007, 2009 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -41,6 +41,7 @@ import org.eclipse.cdt.ui.PreferenceConstants;
 import org.eclipse.cdt.ui.text.ICPartitions;
 
 import org.eclipse.cdt.internal.ui.editor.CSourceViewer;
+import org.eclipse.cdt.internal.ui.text.c.hover.SourceViewerInformationControl;
 
 /**
  * Abstract class for "quick" source views in light-weight controls.
@@ -50,15 +51,10 @@ import org.eclipse.cdt.internal.ui.editor.CSourceViewer;
 public abstract class AbstractSourceViewerInformationControl extends org.eclipse.jface.text.AbstractInformationControl implements IInformationControlExtension2, DisposeListener {
 
        private ISourceViewer fSourceViewer;
-
        private Color fBackgroundColor;
-
-       private boolean fIsSystemBackgroundColor;
-
+       private boolean fIsSystemBackgroundColor = true;
        private Font fTextFont;
-
        private StyledText fText;
-
        private Label fTitleLabel;
 
        /**
@@ -95,7 +91,13 @@ public abstract class AbstractSourceViewerInformationControl extends org.eclipse
        }
 
        private void initializeColors() {
-               RGB bgRGB= getHoverBackgroundColorRGB();
+               IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+               RGB bgRGB;
+               if (store.getBoolean(PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT)) {
+                       bgRGB= SourceViewerInformationControl.getVisibleBackgroundColor(getShell().getDisplay());
+               } else {
+                       bgRGB= PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR);
+               }
                if (bgRGB != null) {
                        fBackgroundColor= new Color(getShell().getDisplay(), bgRGB);
                        fIsSystemBackgroundColor= false;
@@ -105,13 +107,6 @@ public abstract class AbstractSourceViewerInformationControl extends org.eclipse
                }
        }
        
-       private RGB getHoverBackgroundColorRGB() {
-               IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
-               return store.getBoolean(PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT)
-                       ? null
-                       : PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR);
-       }
-
        @Override
        public void createContent(Composite parent) {
                Composite content= new Composite(parent, SWT.NONE);
index f921d4d..a18fc5e 100644 (file)
@@ -209,10 +209,7 @@ public class CReconciler extends MonoReconciler {
                        if ((flags & ICElementDelta.F_CONTENT) != 0) {
                                if (!fIsReconciling && isRelevantElement(delta.getElement())) {
                                        // mark model changed, but don't update immediately
-                                       fIndexerListener.ignoreChanges(false);
                                        setCModelChanged(true);
-                               } else if (delta.getElement() instanceof ITranslationUnit) {
-                                       fIndexerListener.ignoreChanges(true);
                                }
                        }
                        if ((flags & (
@@ -237,7 +234,6 @@ public class CReconciler extends MonoReconciler {
 
        private class IndexerListener implements IIndexerStateListener, IIndexChangeListener {
                private boolean fIndexChanged;
-               private boolean fIgnoreChanges;
 
                /*
                 * @see org.eclipse.cdt.core.index.IIndexerStateListener#indexChanged(org.eclipse.cdt.core.index.IIndexerStateEvent)
@@ -252,25 +248,17 @@ public class CReconciler extends MonoReconciler {
                                                setCModelChanged(true);
                                        }
                                }
-                               fIgnoreChanges= false;
                        }
                }
 
-               public void ignoreChanges(boolean ignore) {
-                       fIgnoreChanges= ignore;
-               }
-
                /*
                 * @see org.eclipse.cdt.core.index.IIndexChangeListener#indexChanged(org.eclipse.cdt.core.index.IIndexChangeEvent)
                 */
                public void indexChanged(IIndexChangeEvent event) {
                        if (!fIndexChanged && isRelevantProject(event.getAffectedProject())) {
-                               if (!fIgnoreChanges || event.isCleared() || event.isReloaded() || event.hasNewFile()) {
-                                       fIndexChanged= true;
-                               }
+                               fIndexChanged= true;
                        }
                }
-               
        }
 
        /** The reconciler's editor */
index 608cd2e..0eb4ff3 100644 (file)
@@ -262,8 +262,7 @@ public class CMacroExpansionExplorationControl extends AbstractCompareViewerInfo
                GridData gd= new GridData(GridData.BEGINNING | GridData.FILL_BOTH);
                gd.heightHint= fMacroText.getLineHeight() * 2;
                fMacroText.setLayoutData(gd);
-               fMacroText.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
-               
+
                final Document doc= new Document();
                CUIPlugin.getDefault().getTextTools().setupCDocument(doc);
                sourceViewer.setDocument(doc);
index b5d4541..c4c7242 100644 (file)
@@ -629,12 +629,8 @@ public class CSourceHover extends AbstractCEditorTextHover {
 
                                String[] sourceLines= Strings.convertIntoLines(source);
                                String firstLine= sourceLines[0];
-                               if (firstLine.length() > 0 && !Character.isWhitespace(firstLine.charAt(0)))
-                                       sourceLines[0]= ""; //$NON-NLS-1$
-                               Strings.trimIndentation(sourceLines, getTabWidth(), getTabWidth());
-
-                               if (!Character.isWhitespace(firstLine.charAt(0)))
-                                       sourceLines[0]= firstLine;
+                               boolean ignoreFirstLine = firstLine.length() > 0 && !Character.isWhitespace(firstLine.charAt(0));
+                               Strings.trimIndentation(sourceLines, getTabWidth(), getTabWidth(), !ignoreFirstLine);
 
                                source = Strings.concatenate(sourceLines, delim);
                                return source;
index 23d155c..b1ef9f2 100644 (file)
@@ -1,13 +1,13 @@
 /*******************************************************************************
- * Copyright (c) 2002, 2008 QNX Software Systems and others.
+ * Copyright (c) 2002, 2011 QNX Software Systems and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/epl-v10.html
  *
  * Contributors:
- * QNX Software Systems - Initial API and implementation
- * Anton Leherbauer (Wind River Systems)
+ *     QNX Software Systems - Initial API and implementation
+ *     Anton Leherbauer (Wind River Systems)
  *******************************************************************************/
 
 package org.eclipse.cdt.internal.ui.text.c.hover;
@@ -46,9 +46,12 @@ import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.texteditor.AbstractTextEditor;
 
+import org.eclipse.cdt.ui.CDTUITools;
 import org.eclipse.cdt.ui.CUIPlugin;
 import org.eclipse.cdt.ui.PreferenceConstants;
+import org.eclipse.cdt.ui.text.ICColorConstants;
 import org.eclipse.cdt.ui.text.ICPartitions;
 
 import org.eclipse.cdt.internal.ui.editor.CSourceViewer;
@@ -89,6 +92,10 @@ public class SourceViewerInformationControl implements IInformationControl, IInf
         */
        private Font fStatusTextFont;
        /**
+        * The color of the optional status text label or <code>null</code> if none.
+        */
+       private Color fStatusTextForegroundColor;
+       /**
         * The width size constraint.
         * @since 4.0
         */
@@ -198,16 +205,49 @@ public class SourceViewerInformationControl implements IInformationControl, IInf
                        GridData gd2= new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_BEGINNING);
                        fStatusField.setLayoutData(gd2);
 
-                       // Regarding the color see bug 41128
-                       fStatusField.setForeground(display.getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW));
+                       RGB defaultColor= CDTUITools.getColorManager().getColor(ICColorConstants.C_DEFAULT).getRGB();
+                       fStatusTextForegroundColor= new Color(fStatusField.getDisplay(), blend(fBackgroundColor.getRGB(), defaultColor, 0.56f));
+                       fStatusField.setForeground(fStatusTextForegroundColor);
                        fStatusField.setBackground(fBackgroundColor);
                }
 
                addDisposeListener(this);
        }
 
+       /**
+        * Returns an RGB that lies between the given foreground and background
+        * colors using the given mixing factor. A <code>factor</code> of 1.0 will produce a
+        * color equal to <code>fg</code>, while a <code>factor</code> of 0.0 will produce one
+        * equal to <code>bg</code>.
+        * @param bg the background color
+        * @param fg the foreground color
+        * @param factor the mixing factor, must be in [0,&nbsp;1]
+        *
+        * @return the interpolated color
+        */
+       @SuppressWarnings("null")
+       private static RGB blend(RGB bg, RGB fg, float factor) {
+               // copy of org.eclipse.jface.internal.text.revisions.Colors#blend(..)
+               Assert.isLegal(bg != null);
+               Assert.isLegal(fg != null);
+               Assert.isLegal(factor >= 0f && factor <= 1f);
+               
+               float complement= 1f - factor;
+               return new RGB(
+                               (int) (complement * bg.red + factor * fg.red),
+                               (int) (complement * bg.green + factor * fg.green),
+                               (int) (complement * bg.blue + factor * fg.blue)
+               );
+       }
+       
        private void initializeColors() {
-               RGB bgRGB= getHoverBackgroundColorRGB();
+               IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
+               RGB bgRGB;
+               if (store.getBoolean(PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT)) {
+                       bgRGB= getVisibleBackgroundColor(fShell.getDisplay());
+               } else {
+                       bgRGB= PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR);
+               }
                if (bgRGB != null) {
                        fBackgroundColor= new Color(fShell.getDisplay(), bgRGB);
                        fIsSystemBackgroundColor= false;
@@ -217,11 +257,29 @@ public class SourceViewerInformationControl implements IInformationControl, IInf
                }
        }
 
-       private RGB getHoverBackgroundColorRGB() {
-               IPreferenceStore store= CUIPlugin.getDefault().getPreferenceStore();
-               return store.getBoolean(PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR_SYSTEM_DEFAULT)
-                       ? null
-                       : PreferenceConverter.getColor(store, PreferenceConstants.EDITOR_SOURCE_HOVER_BACKGROUND_COLOR);
+       /**
+        * Returns <code>null</code> if {@link SWT#COLOR_INFO_BACKGROUND} is visibly distinct from the
+        * default source text color. Otherwise, returns the editor background color.
+        * 
+        * @param display the display
+        * @return an RGB or <code>null</code>
+        */
+       public static RGB getVisibleBackgroundColor(Display display) {
+               float[] infoBgHSB= display.getSystemColor(SWT.COLOR_INFO_BACKGROUND).getRGB().getHSB();
+               
+               Color defaultColor= CDTUITools.getColorManager().getColor(ICColorConstants.C_DEFAULT);
+               RGB defaultRGB= defaultColor != null ? defaultColor.getRGB() : new RGB(255, 255, 255);
+               float[] defaultHSB= defaultRGB.getHSB();
+               
+               if (Math.abs(infoBgHSB[2] - defaultHSB[2]) < 0.5f) {
+                       // workaround for dark tooltip background color, see https://bugs.eclipse.org/365051
+                       IPreferenceStore preferenceStore= CUIPlugin.getDefault().getCombinedPreferenceStore();
+                       boolean useDefault= preferenceStore.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT);
+                       if (useDefault)
+                               return display.getSystemColor(SWT.COLOR_LIST_BACKGROUND).getRGB();
+                       return PreferenceConverter.getColor(preferenceStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND);
+               }
+               return null;
        }
 
        /**
@@ -274,6 +332,10 @@ public class SourceViewerInformationControl implements IInformationControl, IInf
                if (fStatusTextFont != null && !fStatusTextFont.isDisposed())
                        fStatusTextFont.dispose();
 
+               if (fStatusTextForegroundColor != null && !fStatusTextForegroundColor.isDisposed())
+                       fStatusTextForegroundColor.dispose();
+               
+               fStatusTextForegroundColor= null;
                fStatusTextFont= null;
                fTextFont= null;
                fShell= null;
index da4560c..8e53df4 100644 (file)
@@ -257,6 +257,9 @@ public class InclusionProposalComputer implements ICompletionProposalComputer {
                final int prefixLength = namePrefix.length();
                final IProject project= tu.getCProject().getProject();
                File[] files= fileDir.listFiles();
+               if (files == null) {
+                       return;
+               }
                IContentAssistMatcher matcher = ContentAssistMatcherFactory.getInstance().createMatcher(namePrefix);
                for (File file : files) {
                        final String name= file.getName();
index 9f55a72..bfebbde 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2010 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -129,8 +129,10 @@ public class TemplateEngine {
 
            IDocument document= viewer.getDocument();
                Point selection= viewer.getSelectedRange();
-               boolean multipleLinesSelected= areMultipleLinesSelected(viewer);
-               if (multipleLinesSelected) {
+               boolean linesSelected= areLinesSelected(viewer);
+               boolean showLineSelectionTemplates = linesSelected;
+               boolean showWordSelectionTemplates = !linesSelected || isOnlyWordOnLine(viewer);
+               if (linesSelected) {
                        // adjust line selection to start at column 1 and end at line delimiter
                        try {
                                IRegion startLine = document.getLineInformationOfOffset(selection.x);
@@ -168,14 +170,15 @@ public class TemplateEngine {
 
                } else {
 
-                       if (multipleLinesSelected || context.getKey().length() == 0)
+                       if (linesSelected || context.getKey().length() == 0)
                                context.setForceEvaluation(true);
 
                        for (int i= 0; i != templates.length; i++) {
                                Template template= templates[i];
                                if (context.canEvaluate(template) &&
                                        template.getContextTypeId().equals(context.getContextType().getId()) &&
-                                       (!multipleLinesSelected && template.getPattern().indexOf($_WORD_SELECTION) != -1 || (multipleLinesSelected && template.getPattern().indexOf($_LINE_SELECTION) != -1)))
+                                       ((showWordSelectionTemplates && template.getPattern().indexOf($_WORD_SELECTION) != -1 || 
+                                        (showLineSelectionTemplates && template.getPattern().indexOf($_LINE_SELECTION) != -1))))
                                {
                                        fProposals.add(new CTemplateProposal(templates[i], context, region, image));
                                }
@@ -191,7 +194,7 @@ public class TemplateEngine {
         * 
         * @return <code>true</code> if one or multiple lines are selected
         */
-       private boolean areMultipleLinesSelected(ITextViewer viewer) {
+       private boolean areLinesSelected(ITextViewer viewer) {
                if (viewer == null)
                        return false;
 
@@ -218,5 +221,33 @@ public class TemplateEngine {
                        return false;
                }
        }
+       
+       /**
+        * Returns <code>true</code> if there's only one word on the line
+        * 
+        * @return <code>true</code> if only one word is on the line
+        */
+       private boolean isOnlyWordOnLine(ITextViewer viewer) {
+               if (viewer == null)
+                       return false;
+
+               Point s= viewer.getSelectedRange();
+               if (s.y == 0)
+                       return false;
+
+               try {
+
+                       IDocument document= viewer.getDocument();
+                       int startLine= document.getLineOfOffset(s.x);
+                       IRegion line= document.getLineInformation(startLine);
+                       
+                       String lineContent = document.get(line.getOffset(), line.getLength());
+                       
+                       return lineContent.trim().lastIndexOf(' ', s.x) == -1;
+
+               } catch (BadLocationException x) {
+                       return false;
+               }
+       }
 }
 
index a8faf92..d6eb076 100644 (file)
@@ -11,6 +11,8 @@
 package org.eclipse.cdt.internal.ui.viewsupport;
 
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.jface.preference.JFacePreferences;
 import org.eclipse.jface.resource.JFaceResources;
 import org.eclipse.jface.viewers.IDecoration;
@@ -31,28 +33,26 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
  * renders the label using the qualifier (gray) color.
  */
 public class ExcludedFileDecorator implements ILightweightLabelDecorator {
-
        public void decorate(Object element, IDecoration decoration) {
-               if (element instanceof IFile) {
-                       IFile resource = (IFile) element;
+               if (element instanceof IFile || element instanceof IFolder) {
+                       IResource resource = (IResource) element;
                        ICProjectDescriptionManager mngr = CoreModel.getDefault().getProjectDescriptionManager();
                        ICProjectDescription desc = mngr.getProjectDescription(resource.getProject(), false);
                        if (desc == null)
                                return;
                        ICConfigurationDescription conf = desc.getDefaultSettingConfiguration();
                        ICSourceEntry[] entries = conf.getSourceEntries();
-                       boolean isSource = false;
+                       boolean isUnderSourceRoot = false;
                        for (ICSourceEntry icSourceEntry : entries) {
                                if (icSourceEntry.getFullPath().isPrefixOf(resource.getFullPath())) {
-                                       isSource = true;
+                                       isUnderSourceRoot = true;
                                        break;
                                }
                        }
                        // Only bother to mark items that would be included otherwise
-                       if (isSource && CDataUtil.isExcluded(resource.getFullPath(), entries)) {
+                       if (isUnderSourceRoot && CDataUtil.isExcluded(resource.getFullPath(), entries)) {
                                decoration.addOverlay(CPluginImages.DESC_OVR_INACTIVE);
-                               decoration.setForegroundColor(JFaceResources.getColorRegistry().get(
-                                               JFacePreferences.QUALIFIER_COLOR));
+                               decoration.setForegroundColor(JFaceResources.getColorRegistry().get(JFacePreferences.QUALIFIER_COLOR));
                        }
                }
        }
@@ -71,4 +71,4 @@ public class ExcludedFileDecorator implements ILightweightLabelDecorator {
        public void removeListener(ILabelProviderListener listener) {
                // We don't track state changes
        }
-}
\ No newline at end of file
+}
index 9de3a40..776524c 100644 (file)
 package org.eclipse.cdt.internal.ui.wizards.classwizard;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -42,6 +46,7 @@ import org.eclipse.cdt.core.browser.IQualifiedTypeName;
 import org.eclipse.cdt.core.browser.ITypeReference;
 import org.eclipse.cdt.core.browser.QualifiedTypeName;
 import org.eclipse.cdt.core.formatter.CodeFormatter;
+import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
 import org.eclipse.cdt.core.model.CModelException;
 import org.eclipse.cdt.core.model.CoreModel;
 import org.eclipse.cdt.core.model.ICContainer;
@@ -203,6 +208,9 @@ public class NewClassCodeGenerator {
                                new SubProgressMonitor(monitor, 50));
                    if (headerFile != null) {
                        headerTU = (ITranslationUnit) CoreModel.getDefault().create(headerFile);
+                       if (headerTU == null) {
+                           throw new CodeGeneratorException("Failed to create " + headerFile); //$NON-NLS-1$
+                       }
        
                        // Create a working copy with a new owner
                        headerWorkingCopy = headerTU.getWorkingCopy();
@@ -246,6 +254,9 @@ public class NewClassCodeGenerator {
                                        new SubProgressMonitor(monitor, 50));
                            if (sourceFile != null) {
                                sourceTU = (ITranslationUnit) CoreModel.getDefault().create(sourceFile);
+                               if (sourceTU == null) {
+                                   throw new CodeGeneratorException("Failed to create " + sourceFile); //$NON-NLS-1$
+                               }
                                monitor.worked(50);
 
                                // Create a working copy with a new owner
@@ -279,6 +290,9 @@ public class NewClassCodeGenerator {
                                new SubProgressMonitor(monitor, 50));
                    if (testFile != null) {
                        testTU = (ITranslationUnit) CoreModel.getDefault().create(testFile);
+                       if (testTU == null) {
+                           throw new CodeGeneratorException("Failed to create " + testFile); //$NON-NLS-1$
+                       }
                        monitor.worked(50);
 
                        // Create a working copy with a new owner
@@ -300,6 +314,8 @@ public class NewClassCodeGenerator {
        
                    fCreatedTestTU = testTU;
             }
+        } catch (CodeGeneratorException e) {
+               deleteAllCreatedFiles();
         } finally {
             if (headerWorkingCopy != null) {
                 headerWorkingCopy.destroy();
@@ -316,6 +332,19 @@ public class NewClassCodeGenerator {
         return fCreatedClass;
     }
 
+       private void deleteAllCreatedFiles() {
+               IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+               for (IPath path : new IPath[] { fHeaderPath, fSourcePath, fSourcePath }) {
+                       if (path != null) {
+                               try {
+                                       IFile file = root.getFile(path);
+                                       file.delete(true, null);
+                               } catch (CoreException e) {
+                               }
+                       }
+               }
+       }
+
     /**
      * Format given source content according to the project's code style options.
      * 
@@ -326,17 +355,19 @@ public class NewClassCodeGenerator {
         */
        private String formatSource(String content, ITranslationUnit tu) throws CModelException {
         String lineDelimiter= StubUtility.getLineDelimiterUsed(tu);
-        TextEdit edit= CodeFormatterUtil.format(CodeFormatter.K_TRANSLATION_UNIT, content, 0, lineDelimiter,
-                       tu.getCProject().getOptions(true));
+        Map<String, Object> options = new HashMap<String, Object>(tu.getCProject().getOptions(true));
+        options.put(DefaultCodeFormatterConstants.FORMATTER_TRANSLATION_UNIT, tu);
+               TextEdit edit= CodeFormatterUtil.format(CodeFormatter.K_TRANSLATION_UNIT, content, 0,
+                               lineDelimiter, options);
         if (edit != null) {
                IDocument doc= new Document(content);
                try {
                                edit.apply(doc);
                content= doc.get();
-                       } catch (MalformedTreeException exc) {
-                               CUIPlugin.log(exc);
-                       } catch (BadLocationException exc) {
-                               CUIPlugin.log(exc);
+                       } catch (MalformedTreeException e) {
+                               CUIPlugin.log(e);
+                       } catch (BadLocationException e) {
+                               CUIPlugin.log(e);
                        }
         }
         return content;
index a479240..55f57d0 100644 (file)
  *     IBM Corporation
  *     Markus Schorn (Wind River Systems)
  *     Warren Paul (Nokia) - 174238
+ *     Sergey Prigogin (Google)
  *******************************************************************************/
 package org.eclipse.cdt.internal.ui.wizards.classwizard;
 
 import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IWorkspaceRoot;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -114,31 +116,55 @@ public class NewClassWizardUtil {
         }
         return null;
     }
+
+    //XXX Remove
+//    /**
+//     * Returns the parent source folder for the given resource. If the given
+//     * resource is already a source folder, the corresponding C element is returned.
+//     * 
+//     * @param resource the resource
+//     * @return the source folder
+//     */
+//    public static ICContainer getSourceFolder(IResource resource) {
+//        if (resource != null && resource.exists()) {
+//            int resType = resource.getType();
+//            if (resType == IResource.PROJECT || resType == IResource.FOLDER) {
+//                ICElement elem = CoreModel.getDefault().create(resource.getFullPath());
+//                if (elem != null) {
+//                    ICContainer sourceFolder = getSourceFolder(elem);
+//                    if (sourceFolder != null)
+//                        return sourceFolder;
+//                }
+//            } else {
+//                return getSourceFolder(resource.getParent());
+//            }
+//        }
+//        return null;
+//    }
     
     /**
-     * Returns the parent source folder for the given resource. If the given
-     * resource is already a source folder, the corresponding C element is returned.
+     * Checks if a given resource is under a source root.
      * 
      * @param resource the resource
-     * @return the source folder
+     * @return <code>true</code> if the resource is under one of the project source roots
      */
-    public static ICContainer getSourceFolder(IResource resource) {
-        if (resource != null && resource.exists()) {
-            int resType = resource.getType();
-            if (resType == IResource.PROJECT || resType == IResource.FOLDER) {
-                ICElement elem = CoreModel.getDefault().create(resource.getFullPath());
-                if (elem != null) {
-                    ICContainer sourceFolder = getSourceFolder(elem);
-                    if (sourceFolder != null)
-                        return sourceFolder;
-                }
-            } else {
-                return getSourceFolder(resource.getParent());
-            }
-        }
-        return null;
+    public static boolean isOnSourceRoot(IResource resource) {
+       IProject project = resource.getProject();
+       ICProject cProject = CoreModel.getDefault().create(project);
+       return cProject.isOnSourceRoot(resource);
     }
-    
+
+    /**
+     * Checks if a given file path is under a source root.
+     * 
+     * @param path the file path
+     * @return <code>true</code> if the resource is under one of the project source roots
+     */
+    public static boolean isOnSourceRoot(IPath path) {
+       IFile file = getWorkspaceRoot().getFile(path);
+       return isOnSourceRoot(file);
+    }
+
     /**
      * Returns the first source root in the given project. If the project has
      * no source roots as children, the project itself is returned.
index 2ff71b1..952448d 100644 (file)
@@ -88,6 +88,7 @@ public class IndexerBlock extends AbstractCOptionPage {
        private Combo                                   fBuildConfigComboBox;
        private ControlEnableState              fEnableState;
        private Group fBuildConfigGroup;
+       private int fLastScope;
     
     public IndexerBlock(){
                super(INDEXER_LABEL);
@@ -381,7 +382,9 @@ public class IndexerBlock extends AbstractCOptionPage {
        
     protected void onPreferenceScopeChange() {
        int scope= computeScope();
-       if (fCurrentProperties == null || scope != IndexerPreferences.SCOPE_PROJECT_PRIVATE) {
+       if (fCurrentProperties == null || scope == IndexerPreferences.SCOPE_INSTANCE
+                       || (fLastScope == IndexerPreferences.SCOPE_INSTANCE 
+                       && scope == IndexerPreferences.SCOPE_PROJECT_SHARED)) {
                Properties props= IndexerPreferences.getProperties(getProject(), scope);
 
                String indexerId= props.getProperty(IndexerPreferences.KEY_INDEXER_ID);
@@ -393,14 +396,17 @@ public class IndexerBlock extends AbstractCOptionPage {
                        }
                }
                fCurrentProperties= props;
+               } else {
+                       fCurrentProperties.putAll(fCurrentPage.getProperties());
                }
                updateForNewProperties(scope);
        updateBuildConfigForScope(scope);
+       fLastScope= scope;
        }
 
        private void updateForNewProperties(int scope) {
                String indexerId= fCurrentProperties.getProperty(IndexerPreferences.KEY_INDEXER_ID);
-               if (indexerId.equals(IPDOMManager.ID_NO_INDEXER)) {
+               if (IPDOMManager.ID_NO_INDEXER.equals(indexerId)) {
                        fEnableIndexer.setSelection(false);
                } else {
                        fEnableIndexer.setSelection(true);
index 7528b6f..8c3ca85 100644 (file)
@@ -35,7 +35,6 @@ import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -119,6 +118,7 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
                };
 
        private static final Comparator<Object> comp = CDTListComparator.getInstance();
+       private static String selectedLanguage;
 
        private final static Image IMG_FOLDER = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_FOLDER);
        private final static Image IMG_INCLUDES_FOLDER = CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_INCLUDES_FOLDER);
@@ -291,6 +291,7 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
                                        ICLanguageSetting langSetting = (ICLanguageSetting) items[0].getData();
                                        if (langSetting != null) {
                                                lang = langSetting;
+                                               selectedLanguage = getLanguageName(lang);
                                                update();
                                        }
                                }
@@ -372,40 +373,47 @@ public abstract class AbstractLangsListTab extends AbstractCPropertyTab {
                if (rcDes == null || !canBeVisible()) return;
                updateExport();
                langTree.removeAll();
-               TreeItem firstItem = null;
+               TreeItem selectedItem = null;
                ls = getLangSetting(rcDes);
                if (ls != null) {
                        Arrays.sort(ls, CDTListComparator.getInstance());
                        for (ICLanguageSetting langSetting : ls) {
                                if ((langSetting.getSupportedEntryKinds() & getKind()) != 0) {
                                        TreeItem t = new TreeItem(langTree, SWT.NONE);
-                                       String langId = langSetting.getLanguageId();
-                                       if (langId != null && !langId.equals(EMPTY_STR)) {
-                                               // Bug #178033: get language name via LangManager.
-                                               ILanguageDescriptor langDes = LanguageManager.getInstance().getLanguageDescriptor(langId);
-                                               if (langDes == null)
-                                                       langId = null;
-                                               else
-                                                       langId = langDes.getName();
-                                       }
-                                       if (langId == null || langId.equals(EMPTY_STR))
-                                               langId = langSetting.getName();
+                                       String langId = getLanguageName(langSetting);
                                        t.setText(0, langId);
                                        t.setData(langSetting);
-                                       if (firstItem == null) {
-                                               firstItem = t;
+                                       if (selectedItem == null
+                                                       || (selectedLanguage != null && selectedLanguage.equals(langId))) {
+                                               selectedItem = t;
                                                lang = langSetting;
                                        }
                                }
                        }
 
-                       if (firstItem != null && table != null) {
-                               langTree.setSelection(firstItem);
+                       if (selectedItem != null && table != null) {
+                               langTree.setSelection(selectedItem);
                        }
                }
                update();
        }
 
+       private String getLanguageName(ICLanguageSetting langSetting) {
+               String langId = langSetting.getLanguageId();
+               String langName = null;
+               if (langId != null && langId.length() != 0) {
+                       // Bug #178033: get language name via LangManager.
+                       ILanguageDescriptor langDes = LanguageManager.getInstance().getLanguageDescriptor(langId);
+                       if (langDes != null)
+                               langName = langDes.getName();
+               }
+               if (langName == null || langName.length() == 0)
+                       langName = langSetting.getName();
+               if (langName == null || langName.length() == 0)
+                       langName = langId;
+               return langName;
+       }
+
        private void updateExport() {
                exported = new ArrayList<ICSettingEntry>();
                ICExternalSetting[] extSettings = getResDesc().getConfiguration().getExternalSettings();
index 8c339a7..e4042ac 100644 (file)
@@ -31,7 +31,6 @@ import org.eclipse.cdt.internal.core.model.TranslationUnit;
 import org.eclipse.cdt.internal.ui.refactoring.DocumentAdapter;
 import org.eclipse.cdt.internal.ui.refactoring.UndoCTextFileChange;
 
-
 /**
  * A TextFileChange that uses a working copy in order to generate CModel events.
  * 
@@ -63,10 +62,6 @@ public class CTextFileChange extends TextFileChange {
         setTextType(TEXT_TYPE);
     }
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.ltk.core.refactoring.TextFileChange#acquireDocument(org.eclipse.core.runtime.IProgressMonitor)
-     */
     @Override
        protected IDocument acquireDocument(IProgressMonitor pm) throws CoreException {
         IDocument doc= super.acquireDocument(pm);
@@ -85,16 +80,11 @@ public class CTextFileChange extends TextFileChange {
        protected void commit(final IDocument document, final IProgressMonitor pm) throws CoreException {
         if (fWorkingCopy == null) {
                super.commit(document, pm);
-        }
-        else if (needsSaving()) {
+        } else if (needsSaving()) {
                fWorkingCopy.commit(false, pm);
         }
     }
     
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.ltk.core.refactoring.TextFileChange#releaseDocument(org.eclipse.jface.text.IDocument, org.eclipse.core.runtime.IProgressMonitor)
-     */
     @Override
        protected void releaseDocument(IDocument document, IProgressMonitor pm) throws CoreException {
         super.releaseDocument(document, pm);
@@ -105,11 +95,7 @@ public class CTextFileChange extends TextFileChange {
             }
         }
     }
-    
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.ltk.core.refactoring.TextFileChange#createUndoChange(org.eclipse.text.edits.UndoEdit, org.eclipse.ltk.core.refactoring.ContentStamp)
-     */
+
     @Override
        protected Change createUndoChange(UndoEdit edit, ContentStamp stampToRestore) {
         return new UndoCTextFileChange(getName(), getFile(), edit, stampToRestore, getSaveMode());
index d6ec655..f214a9f 100644 (file)
@@ -476,18 +476,7 @@ import org.eclipse.cdt.internal.ui.newui.Messages;
 
                @SuppressWarnings({ "unchecked", "rawtypes" })
                public List filterItems(List items) {
-                       List<EntryDescriptor> ret = new ArrayList<EntryDescriptor>();
-                       
-                       for(Object item: items) {
-                               if(item instanceof EntryDescriptor) {
-                                       if(((EntryDescriptor)(item)).getId().contains("samsung") == true || ((EntryDescriptor)(item)).getId().contains("tizen") == true) {                                              
-                                       }
-                                       else {
-                                               ret.add((EntryDescriptor)item);
-                                       }
-                               }
-                       }
-                       return ret;
+                       return items;
                }
 }
 
index ae4f034..fa9f75c 100644 (file)
@@ -1010,27 +1010,14 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
     }
 
     /**
-     * handles changes to the source folder field
+     * Handles changes to the source folder field
      */
     private final class SourceFolderFieldAdapter implements IStringButtonAdapter, IDialogFieldListener {
                public void changeControlPressed(DialogField field) {
                    IPath oldFolderPath = getSourceFolderFullPath();
                        IPath newFolderPath = chooseSourceFolder(oldFolderPath);
                        if (newFolderPath != null) {
-                               IPath headerPath = getHeaderFileFullPath();
-                               IPath sourcePath = getSourceFileFullPath();
                                setSourceFolderFullPath(newFolderPath, false);
-                               if (oldFolderPath != null && oldFolderPath.matchingFirstSegments(newFolderPath) == 0) {
-                                   if (headerPath != null) {
-                                       headerPath = newFolderPath.append(headerPath.lastSegment());
-                                   }
-                                   if (sourcePath != null) {
-                                       sourcePath = newFolderPath.append(sourcePath.lastSegment());
-                                   }
-                               }
-                           // adjust the relative paths
-                           setHeaderFileFullPath(headerPath, false);
-                           setSourceFileFullPath(sourcePath, false);
                                handleFieldChanged(SOURCE_FOLDER_ID|ALL_FIELDS);
                        }
                }
@@ -1541,7 +1528,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
                                        }
                                        status.setWarning(NewClassWizardMessages.NewClassCreationWizardPage_warning_NotInACProject);
                                }
-                           if (NewClassWizardUtil.getSourceFolder(res) == null) {
+                           if (!NewClassWizardUtil.isOnSourceRoot(res)) {
                                        status.setError(NLS.bind(NewClassWizardMessages.NewClassCreationWizardPage_error_NotASourceFolder, folderPath));
                                        return status;
                                }
@@ -1787,7 +1774,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
                }
                
                // Make sure the file location is under a source root
-               if (NewClassWizardUtil.getSourceFolder(path) == null) {
+               if (!NewClassWizardUtil.isOnSourceRoot(path)) {
                        status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_HeaderFileNotInSourceFolder);
                        return status;
                }
@@ -1867,7 +1854,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
                }
                
                // Make sure the file location is under a source root
-               if (NewClassWizardUtil.getSourceFolder(path) == null) {
+               if (!NewClassWizardUtil.isOnSourceRoot(path)) {
                        status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_SourceFileNotInSourceFolder);
                        return status;
                }
@@ -1951,7 +1938,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
                }
                
                // Make sure the file location is under a source root
-               if (NewClassWizardUtil.getSourceFolder(path) == null) {
+               if (!NewClassWizardUtil.isOnSourceRoot(path)) {
                        status.setError(NewClassWizardMessages.NewClassCreationWizardPage_error_TestFileNotInSourceFolder);
                        return status;
                }
@@ -2036,7 +2023,7 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
                fDialogSettings.put(KEY_STUB_SELECTED + i, fMethodStubsDialogField.isChecked(stub));
         }
 
-               fCreatedClass = null;
+        fCreatedClass = null;
         fCreatedHeaderFile = null;
         fCreatedSourceFile = null;
         fCreatedTestFile = null;
@@ -2044,28 +2031,10 @@ public class NewClassCreationWizardPage extends NewElementWizardPage {
         IPath headerPath = getHeaderFileFullPath();
         IPath sourcePath = getSourceFileFullPath();
         IPath testPath = getTestFileFullPath();
-        createClass(
-                       headerPath != null ? getCanonicalPath(headerPath) : null,
-                       sourcePath != null ? getCanonicalPath(sourcePath) : null,
-                testPath != null ? getCanonicalPath(testPath) : null,
-                getClassName(),
-                namespace,
-                getBaseClasses(),
-                getSelectedMethodStubs(), monitor);
+        createClass(headerPath, sourcePath, testPath, getClassName(), namespace, getBaseClasses(),
+                       getSelectedMethodStubs(), monitor);
        }
     
-    private IPath getCanonicalPath(IPath path) throws CoreException {
-       IWorkspaceRoot root = NewClassWizardUtil.getWorkspaceRoot();
-       IFile file = root.getFile(path);
-       URI location = file.getLocationURI();
-       URI canonicalLocation = EFS.getStore(location).toURI();
-       IFile[] files = root.findFilesForLocationURI(canonicalLocation);
-       if (files.length > 0) {
-               return files[0].getFullPath();
-       }
-       return null;
-       }
-
        /**
      * Returns whether the generated header and source files should be
      * opened in editors after the finish button is pressed.