1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-12-12 12:05:37 -08:00
parent c8a91faa25
commit 7b7b645804
3 changed files with 6 additions and 15 deletions

View file

@ -12,7 +12,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.model; package org.eclipse.cdt.core.model;
import java.net.URI; import java.net.URI;
import org.eclipse.cdt.core.CCProjectNature; 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 <code>projects</code> argument is <code>null</code> al projects * if the <code>projects</code> argument is <code>null</code> al projects
* within the workspace are updated * 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){ public boolean isNewStyleProject(IProject project){
return descriptionManager.isNewStyleProject(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){ public boolean isNewStyleProject(ICProjectDescription des){
return descriptionManager.isNewStyleProject(des); return descriptionManager.isNewStyleProject(des);

View file

@ -62,7 +62,6 @@ import org.eclipse.cdt.internal.ui.util.SWTUtil;
* for displaying/editing CDT file type associations * for displaying/editing CDT file type associations
*/ */
public class CFileTypesPreferenceBlock { public class CFileTypesPreferenceBlock {
private static final int COL_PATTERN = 0; private static final int COL_PATTERN = 0;
private static final int COL_DESCRIPTION = 1; private static final int COL_DESCRIPTION = 1;
private static final int COL_STATUS = 2; private static final int COL_STATUS = 2;
@ -167,7 +166,6 @@ public class CFileTypesPreferenceBlock {
public String getText(Object element) { public String getText(Object element) {
return getColumnText(element, 0); return getColumnText(element, 0);
} }
} }
public CFileTypesPreferenceBlock() { public CFileTypesPreferenceBlock() {
@ -400,9 +398,9 @@ public class CFileTypesPreferenceBlock {
public IContentType[] getRegistedContentTypes() { public IContentType[] getRegistedContentTypes() {
if (fContentTypes == null) { if (fContentTypes == null) {
String [] ids = CoreModel.getRegistedContentTypeIds(); String[] ids = CoreModel.getRegistedContentTypeIds();
IContentTypeManager manager = Platform.getContentTypeManager(); IContentTypeManager manager = Platform.getContentTypeManager();
IContentType [] ctypes = new IContentType[ids.length]; IContentType[] ctypes = new IContentType[ids.length];
for (int i = 0; i < ids.length; i++) { for (int i = 0; i < ids.length; i++) {
ctypes[i] = manager.getContentType(ids[i]); ctypes[i] = manager.getContentType(ids[i]);
} }
@ -502,8 +500,7 @@ public class CFileTypesPreferenceBlock {
IContentTypeSettings settings; IContentTypeSettings settings;
if (fInput == null) { if (fInput == null) {
settings= assoc.getContentType(); settings= assoc.getContentType();
} } else {
else {
try { try {
settings= assoc.getContentType().getSettings(new ProjectScope(fInput)); settings= assoc.getContentType().getSettings(new ProjectScope(fInput));
} catch (CoreException e) { } catch (CoreException e) {

View file

@ -11,8 +11,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.internal.ui.preferences; package org.eclipse.cdt.internal.ui.preferences;
import org.eclipse.cdt.internal.ui.ICHelpContextIds; import org.eclipse.cdt.internal.ui.ICHelpContextIds;
import org.eclipse.jface.preference.PreferencePage; import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
@ -29,7 +27,6 @@ import org.eclipse.ui.PlatformUI;
* type associations for the workspace * type associations for the workspace
*/ */
public class CFileTypesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { public class CFileTypesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
private CFileTypesPreferenceBlock fPrefsBlock; private CFileTypesPreferenceBlock fPrefsBlock;
public CFileTypesPreferencePage() { public CFileTypesPreferencePage() {
@ -72,11 +69,9 @@ public class CFileTypesPreferencePage extends PreferencePage implements IWorkben
*/ */
@Override @Override
public boolean performOk() { public boolean performOk() {
if (fPrefsBlock.performOk()) { if (fPrefsBlock.performOk()) {
} }
return super.performOk(); return super.performOk();
} }
} }