From 7b7b6458041cd83a091d99bc013c324eb9078fa7 Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Mon, 12 Dec 2011 12:05:37 -0800 Subject: [PATCH] Cosmetics. --- .../model/org/eclipse/cdt/core/model/CoreModel.java | 7 +++---- .../ui/preferences/CFileTypesPreferenceBlock.java | 9 +++------ .../ui/preferences/CFileTypesPreferencePage.java | 5 ----- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java index 7fb8c90d832..b6eda1977bf 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/CoreModel.java @@ -12,7 +12,6 @@ *******************************************************************************/ package org.eclipse.cdt.core.model; - import java.net.URI; import org.eclipse.cdt.core.CCProjectNature; @@ -1425,7 +1424,7 @@ public class CoreModel { } /** - * forces the cached data of the specified projects to be re-calculated. + * Forces the cached data of the specified projects to be re-calculated. * if the projects argument is null al projects * within the workspace are updated * @@ -1438,14 +1437,14 @@ public class CoreModel { } /** - * answers whether the given project is a new-style project, i.e. CConfigurationDataProvider-driven + * Answers whether the given project is a new-style project, i.e. CConfigurationDataProvider-driven */ public boolean isNewStyleProject(IProject project){ return descriptionManager.isNewStyleProject(project); } /** - * answers whether the given project is a new-style project, i.e. CConfigurationDataProvider-driven + * Answers whether the given project is a new-style project, i.e. CConfigurationDataProvider-driven */ public boolean isNewStyleProject(ICProjectDescription des){ return descriptionManager.isNewStyleProject(des); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBlock.java index 27409aa1de1..18e0fdacfe1 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBlock.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferenceBlock.java @@ -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) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferencePage.java index 0abfcc22c91..5021dcb820b 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferencePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPreferencePage.java @@ -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(); } - }