From 3f52a6b7b14e0f74b6d5247aa9f17469ff4523e5 Mon Sep 17 00:00:00 2001 From: Leo Treggiari Date: Mon, 16 May 2005 20:48:15 +0000 Subject: [PATCH] Plugin that contains UI elements that are specific to the GNU tool-chain. --- .../.classpath | 7 + .../.cvsignore | 1 + .../.project | 28 + .../about.html | 22 + .../build.properties | 7 + .../plugin.properties | 152 + .../plugin.xml | 2734 +++++++++++++++++ .../managedbuilder/gnu/ui/GnuUIPlugin.java | 84 + 8 files changed, 3035 insertions(+) create mode 100644 build/org.eclipse.cdt.managedbuilder.gnu.ui/.classpath create mode 100644 build/org.eclipse.cdt.managedbuilder.gnu.ui/.cvsignore create mode 100644 build/org.eclipse.cdt.managedbuilder.gnu.ui/.project create mode 100644 build/org.eclipse.cdt.managedbuilder.gnu.ui/about.html create mode 100644 build/org.eclipse.cdt.managedbuilder.gnu.ui/build.properties create mode 100644 build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties create mode 100644 build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml create mode 100644 build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/ui/GnuUIPlugin.java diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/.classpath b/build/org.eclipse.cdt.managedbuilder.gnu.ui/.classpath new file mode 100644 index 00000000000..065ac06e197 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/.cvsignore b/build/org.eclipse.cdt.managedbuilder.gnu.ui/.cvsignore new file mode 100644 index 00000000000..ba077a4031a --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/.cvsignore @@ -0,0 +1 @@ +bin diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/.project b/build/org.eclipse.cdt.managedbuilder.gnu.ui/.project new file mode 100644 index 00000000000..450bdebfdb1 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/.project @@ -0,0 +1,28 @@ + + + org.eclipse.cdt.managedbuilder.gnu.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/about.html b/build/org.eclipse.cdt.managedbuilder.gnu.ui/about.html new file mode 100644 index 00000000000..6f6b96c4c87 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/about.html @@ -0,0 +1,22 @@ + + + +About + + + +

About This Content

+ +

February 24, 2005

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content.

+ + + \ No newline at end of file diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/build.properties b/build/org.eclipse.cdt.managedbuilder.gnu.ui/build.properties new file mode 100644 index 00000000000..6153f04801a --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/build.properties @@ -0,0 +1,7 @@ +bin.includes = plugin.xml,\ + plugin.properties,\ + gnuui.jar,\ + about.html +jars.compile.order = gnuui.jar +source.gnuui.jar = src/ +output.gnuui.jar = bin/ diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties new file mode 100644 index 00000000000..402d954f2a4 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties @@ -0,0 +1,152 @@ +############################################################################### +# Copyright (c) 2003, 2005 IBM Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Common Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/cpl-v10.html +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### + +# plugin names +pluginName=GNU Managed Build Definitions +providerName=Eclipse.org + +# Build Model Names +TargetName.gnu=GNU +TargetName.gnu.exe=Executable (Gnu) +TargetName.gnu.so=Shared Library (Gnu) +TargetName.gnu.lib=Static Library (Gnu) +TargetName.cygw.exe=Executable (Gnu on Windows) +TargetName.cygw.so=Shared Library (Gnu on Windows) +TargetName.cygw.lib=Static Library (Gnu on Windows) +TargetName.macosx.exe=Executable (MacOS X) +TargetName.macosx.so=Shared Library (MacOS X) +TargetName.macosx.lib=Static Library (MacOS X) + +# No longer needed post-2.0 +TargetName.cygw=Cygwin +TargetName.cygw.dll=Cygwin Export Library (DLL) +TargetName.linux=Linux +TargetName.linux.exe=Linux Executable +TargetName.linux.so=Linux Shared Library +TargetName.linux.lib=Linux Static Library +TargetName.solaris=Solaris +TargetName.solaris.exe=Solaris Executable +TargetName.solaris.so=Solaris Shared Library +TargetName.solaris.lib=Solaris Static Library + +# Default Configuration Names +ConfigName.Rel=Release +ConfigName.Dbg=Debug + +# Generic tool-chain names +ToolChainName.Rel=GCC Tool Chain +ToolChainName.Dbg=GCC Tool Chain + +# Generic platform names +PlatformName.Rel=Release Platform +PlatformName.Dbg=Debug Platform + +# Generic builder names +BuilderName.Rel=Gnu Make +BuilderName.Dbg=Gnu Make + +# Generic tool names +ToolName.preprocessor = Preprocessor +ToolName.compiler.c = C Compiler +ToolName.compiler.cpp = C++ Compiler +ToolName.archiver = Archiver +ToolName.linker.c = C Linker +ToolName.linker.cpp = C++ Linker +ToolName.windres = Resource compiler + +# GNU tool names +ToolName.compiler.gnu.c = GCC C Compiler +ToolName.compiler.gnu.cpp = GCC C++ Compiler +ToolName.linker.gnu.c = GCC C Linker +ToolName.linker.gnu.cpp = GCC C++ Linker +ToolName.archiver.gnu = GCC Archiver +ToolName.assembler.gnu = GCC Assembler + +# Mach-O tool names +ToolName.linker.macosx.c = MacOS X C Linker +ToolName.linker.macosx.cpp = MacOS X C++ Linker + +# Generic Category Names +OptionCategory.Symbols = Symbols +OptionCategory.Preproc = Preprocessor +OptionCategory.Dirs = Directories +OptionCategory.General = General +OptionCategory.Optimize=Optimization +OptionCategory.Debug=Debugging +OptionCategory.Warn=Warnings +OptionCategory.Misc=Miscellaneous +OptionCategory.Libs=Libraries +OptionCategory.Shared.Settings=Shared Library Settings + +# Generic Option Names +Option.Posix.PreprocOnly=Preprocess only (-E) +Option.Posix.Nostdinc=Do not search system directories (-nostdinc) + +Option.Posix.DefSym=Defined symbols (-D) +Option.Posix.UndefSym=Undefined symbols (-U) + +Option.Posix.InclPaths=Include paths (-I) + +Option.Posix.OptLevel=Optimization Level +Option.Posix.Optimize.None=None (-O0) +Option.Posix.Optimize.Optimize=Optimize (-O1) +Option.Posix.Optimize.More=Optimize more (-O2) +Option.Posix.Optimize.Most=Optimize most (-O3) +Option.Posix.Optimize.Flags=Other optimization flags + +Option.Posix.DebugLevel=Debug Level +Option.Posix.Debug.None=None +Option.Posix.Debug.Min=Minimal (-g1) +Option.Posix.Debug.Def=Default (-g) +Option.Posix.Debug.Max=Maximum (-g3) +Option.Posix.Debug.Other=Other debugging flags +Option.Posix.Debug.gprof=Generate gprof information (-pg) +Option.Posix.Debug.prof=Generate prof information (-p) + +Option.Posix.Warn.Syntax=Check syntax only (-fsyntax-only) +Option.Posix.Warn.Pedandic=Pedantic (-pedantic) +Option.Posix.Warn.PedErrors=Pedantic warnings as errors (-pedantic-errors) +Option.Posix.Warn.nowarn=Inhibit all warnings (-w) +Option.Posix.Warn.allwarn=All warnings (-Wall) +Option.Posix.Warn.toerrs=Warnings as errors (-Werror) + +Option.Posix.Verbose=Verbose (-v) +Option.OtherFlags=Other flags +Option.Posix.Ansi=Support ANSI programs (-ansi) + +Option.Posix.Linker.NoStartFiles=Do not use standard start files (-nostartfiles) +Option.Posix.Linker.NoDefLibs=Do not use default libraries (-nodefaultlibs) +Option.Posix.Linker.NoStdLibs=No startup or default libs (-nostdlib) +Option.Posix.Linker.Strip=Omit all symbol information (-s) +Option.Posix.Linker.Strip.debug=Omit debug symbol information (-S) +Option.Posix.Linker.Static=No shared libraries (-static) +Option.Posix.Linker.XLinker=Other options (-Xlinker [option]) +Option.Posix.Linker.Flags=Linker flags +Option.Posix.Libs=Libraries (-l) +Option.Posix.Libsearch=Library search path (-L) +Option.Posix.UserObjs=Other objects +Option.Posix.Linker.Shared=Shared (-shared) +Option.Posix.Linker.SOName=Shared object name (-Wl,-soname=) +Option.Posix.Linker.Implib=Import Library name (-Wl,--out-implib=) +Option.Posix.Linker.Defname=DEF file name (-Wl,--output-def=) + +Option.Posix.Archiver.Flags=Archiver flags + +Option.Gnu.Assembler.Flags=Assembler flags +Option.Gnu.Assembler.warn.suppress=Suppress warnings (-W) +Option.Gnu.Assembler.version=Announce version (-v) + +# Platform specific option names +Option.Windows.Windres.OutputFormat = Output format +Option.Windows.Windres.OutputFormat.Coff = coff (--output-format coff) +Option.Windows.Windres.OutputFormat.RC = rc (--output-format rc) +Option.Windows.Windres.OutputFormat.Res = res (--output-format res) +Option.MacOSX.Linker.Shared=Shared (-Wl,-dylib) \ No newline at end of file diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml new file mode 100644 index 00000000000..1a2f7743335 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml @@ -0,0 +1,2734 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/ui/GnuUIPlugin.java b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/ui/GnuUIPlugin.java new file mode 100644 index 00000000000..37494cade95 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/src/org/eclipse/cdt/managedbuilder/gnu/ui/GnuUIPlugin.java @@ -0,0 +1,84 @@ +/******************************************************************************* + * Copyright (c) 2005 Texas Instruments 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: + * Texas Instruments Inc. - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.managedbuilder.gnu.ui; + +import org.eclipse.core.runtime.Plugin; +import org.osgi.framework.BundleContext; +import java.util.*; + +/** + * The main plugin class to be used in the desktop. + */ +public class GnuUIPlugin extends Plugin { + //The shared instance. + private static GnuUIPlugin plugin; + //Resource bundle. + private ResourceBundle resourceBundle; + + /** + * The constructor. + */ + public GnuUIPlugin() { + super(); + plugin = this; + } + + /** + * This method is called upon plug-in activation + */ + public void start(BundleContext context) throws Exception { + super.start(context); + } + + /** + * This method is called when the plug-in is stopped + */ + public void stop(BundleContext context) throws Exception { + super.stop(context); + plugin = null; + resourceBundle = null; + } + + /** + * Returns the shared instance. + */ + public static GnuUIPlugin getDefault() { + return plugin; + } + + /** + * Returns the string from the plugin's resource bundle, + * or 'key' if not found. + */ + public static String getResourceString(String key) { + ResourceBundle bundle = GnuUIPlugin.getDefault().getResourceBundle(); + try { + return (bundle != null) ? bundle.getString(key) : key; + } catch (MissingResourceException e) { + return key; + } + } + + /** + * Returns the plugin's resource bundle, + */ + public ResourceBundle getResourceBundle() { + try { + if (resourceBundle == null) + resourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.managedbuilder.gnu.ui.GnuUIPluginResources"); + } catch (MissingResourceException x) { + resourceBundle = null; + } + return resourceBundle; + } + +}