From 6f9fcdf81f1df8b0ca2810c443aa6810e007d6b3 Mon Sep 17 00:00:00 2001 From: Vivian Kong Date: Wed, 21 Mar 2007 19:24:35 +0000 Subject: [PATCH] fix for bug 178369 - externalize include grouping label in Outline view --- .../org/eclipse/cdt/ui/CElementGrouping.java | 5 ++-- .../src/org/eclipse/cdt/ui/Messages.java | 26 +++++++++++++++++++ .../org/eclipse/cdt/ui/messages.properties | 12 +++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/Messages.java create mode 100644 core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/messages.properties diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementGrouping.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementGrouping.java index b07011e27a7..9d43a0462a6 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementGrouping.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementGrouping.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 QNX Software Systems and others. + * Copyright (c) 2000, 2007 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 @@ -7,6 +7,7 @@ * * Contributors: * QNX Software Systems - Initial API and implementation + * IBM Corporation *******************************************************************************/ package org.eclipse.cdt.ui; @@ -42,7 +43,7 @@ public abstract class CElementGrouping extends WorkbenchAdapter implements IAdap public String getLabel(Object object) { switch (type) { case INCLUDES_GROUPING: - return "include directives"; //$NON-NLS-1$ + return Messages.CElementGrouping_includeGroupingLabel; } return super.getLabel(object); } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/Messages.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/Messages.java new file mode 100644 index 00000000000..28d76d0bcef --- /dev/null +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/Messages.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2007 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM - Initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.ui; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.cdt.ui.messages"; //$NON-NLS-1$ + public static String CElementGrouping_includeGroupingLabel; + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/messages.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/messages.properties new file mode 100644 index 00000000000..c6b8ef0b4cf --- /dev/null +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/messages.properties @@ -0,0 +1,12 @@ +############################################################################### +# Copyright (c) 2007 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 +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# IBM - Initial API and implementation +############################################################################### + +CElementGrouping_includeGroupingLabel=include directives