1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

[261232] initial commit of UPC new project wizard and UPC toolchain

This commit is contained in:
Mike Kucera 2009-04-30 19:53:45 +00:00
parent 9605de728a
commit 436a3e5dd3
14 changed files with 822 additions and 0 deletions

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.cdt.managedbuilder.xlupc.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -0,0 +1,64 @@
#Thu Apr 30 10:33:45 EDT 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning

View file

@ -0,0 +1,23 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.xlupc.ui;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.eclipse.cdt.managedbuilder.xlupc.ui.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.cdt.managedbuilder.core;bundle-version="5.0.1",
org.eclipse.cdt.core;bundle-version="5.0.2",
org.eclipse.core.resources;bundle-version="3.4.1",
org.eclipse.cdt.managedbuilder.ui;bundle-version="5.0.1",
org.eclipse.cdt.ui;bundle-version="5.0.2",
org.eclipse.ui.ide;bundle-version="3.4.1",
org.eclipse.core.variables;bundle-version="3.2.100",
org.eclipse.cdt.managedbuilder.xlc.ui;bundle-version="5.0.0",
org.eclipse.cdt.core.parser.upc;bundle-version="5.0.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.eclipse.cdt.managedbuilder.xlupc.ui,
org.eclipse.cdt.managedbuilder.xlupc.ui.wizards
Bundle-Localization: plugin

View file

@ -0,0 +1,6 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
plugin.properties

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

View file

@ -0,0 +1,23 @@
#Properties file for org.eclipse.cdt.managedbuilder.xlupc.ui
Bundle-Vendor.0 = provider???
Bundle-Name.0 = name???
category.name.1=UPC
wizard.name.1=UPC Project
ToolName.compiler.xlupc = UPC Compiler
TargetName.xlupc.exe=Executable (XL UPC)
TargetName.xlupc.so=Shared Library (XL UPC)
TargetName.xlupc.lib=Static Library(XL UPC)
ToolChainName.Upc=UPC Tool Chain
ConfigName.Dbg=Debug
ConfigName.Rel=Release
PlatformName.Rel=Release Platform
PlatformName.Dbg=Debug Platform
BuildProperty.type.name.xlupc.executable=Executable (UPC)
BuildProperty.type.name.xlupc.staticLibrary=Static Library (UPC)
BuildProperty.type.name.xlupc.sharedLibrary=Shared Library (UPC)

View file

@ -0,0 +1,371 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
<projectType
buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.xlupc.exe"
id="cdt.managedbuild.target.xlupc.exe"
isAbstract="false"
isTest="false"
name="%TargetName.xlupc.exe"
projectMacroSupplier="org.eclipse.cdt.managedbuilder.xlc.ui.XLCProjectMacroSupplier">
<configuration
artifactExtension="exe"
cleanCommand="rm -rf"
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
id="cdt.managedbuild.config.xlupc.exe.debug"
name="%ConfigName.Dbg">
<toolChain
archList="all"
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.xlc.aix.AixConfigurationEnvironmentSupplier"
id="cdt.managedbuild.toolchain.xlupc.exe.debug"
name="%ToolChainName.Upc"
osList="all"
targetTool="cdt.managedbuild.tool.linker.xlupc.exe.debug">
<targetPlatform
archList="all"
binaryParser="org.eclipse.cdt.core.XCOFF32"
id="cdt.managedbuild.targetplatform.xlupc.exe.debug"
name="%PlatformName.Dbg"
osList="all">
</targetPlatform>
<builder
id="cdt.managedbuild.builder.xlupc.exe.debug"
superClass="cdt.managedbuild.target.gnu.builder">
</builder>
<tool
id="cdt.managedbuild.tool.compiler.xlupc.exe.debug"
superClass="org.eclipse.cdt.managedbuilder.xlupc.ui.compiler">
<option
defaultValue="xlc.c.optimization.level.none"
id="cdt.managedbuild.compiler.option.xlupc.exe.debug.optimization.level"
superClass="xlc.c.compiler.option.optimization.level">
</option>
<option
defaultValue="true"
id="cdt.managedbuild.compiler.option.xlupc.exe.debug.debugging.g"
superClass="xlc.c.compiler.option.ecd.g">
</option>
</tool>
<tool
id="cdt.managedbuild.tool.linker.xlupc.exe.debug"
superClass="cdt.managedbuild.tool.xlc.c.linker">
</tool>
<tool
id="cdt.managedbuild.tool.assembler.xlupc.exe.debug"
superClass="cdt.managedbuild.tool.xlc.assembler">
</tool>
</toolChain>
</configuration>
<configuration
artifactExtension="exe"
cleanCommand="rm -rf"
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
id="cdt.managedbuild.config.xlupc.exe.release"
name="%ConfigName.Rel">
<toolChain
archList="all"
configurationEnvironmentSupplier="org.eclipse.cdt.managedbuilder.xlc.aix.AixConfigurationEnvironmentSupplier"
id="cdt.managedbuild.toolchain.xlupc.exe.release"
name="%ToolChainName.Upc"
osList="all"
targetTool="cdt.managedbuild.tool.linker.xlupc.exe.release">
<targetPlatform
archList="all"
binaryParser="org.eclipse.cdt.core.XCOFF32"
id="cdt.managedbuild.targetplatform.xlupc.exe.release"
name="%PlatformName.Rel"
osList="all">
</targetPlatform>
<builder
id="cdt.managedbuild.builder.xlupc.exe.release"
superClass="cdt.managedbuild.target.gnu.builder">
</builder>
<tool
id="cdt.managedbuild.tool.compiler.xlupc.exe.release"
superClass="org.eclipse.cdt.managedbuilder.xlupc.ui.compiler">
<option
defaultValue="xlc.c.optimization.level.Level5"
id="cdt.managedbuild.compiler.option.xlupc.exe.release.optimization.level"
superClass="xlc.c.compiler.option.optimization.level">
</option>
<option
defaultValue="false"
id="cdt.managedbuild.compiler.option.xlupc.exe.release.debugging.g"
superClass="xlc.c.compiler.option.ecd.g">
</option>
</tool>
<tool
id="cdt.managedbuild.tool.linker.xlupc.exe.release"
superClass="cdt.managedbuild.tool.xlc.c.linker">
</tool>
<tool
id="cdt.managedbuild.tool.assembler.xlupc.exe.release"
superClass="cdt.managedbuild.tool.xlc.assembler">
</tool>
</toolChain>
</configuration>
</projectType>
<projectType
buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.xlupc.sharedLib"
id="cdt.managedbuild.target.xlupc.so"
isAbstract="false"
isTest="false"
name="%TargetName.xlupc.so"
projectMacroSupplier="org.eclipse.cdt.managedbuilder.xlc.ui.XLCProjectMacroSupplier">
<configuration
artifactExtension="so"
cleanCommand="rm -rf"
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
id="cdt.managedbuild.config.xlupc.so.debug"
name="%ConfigName.Dbg">
<toolChain
id="cdt.managedbuild.toolchain.xlupc.so.debug"
name="%ToolChainName.Upc"
targetTool="cdt.managedbuild.tool.linker.xlupc.so.debug">
<targetPlatform
archList="all"
binaryParser="org.eclipse.cdt.core.XCOFF32"
id="cdt.managedbuild.targetplatform.xlupc.so.debug"
name="%PlatformName.Dbg"
osList="all">
</targetPlatform>
<builder
id="cdt.managedbuild.builder.xlupc.so.debug"
superClass="cdt.managedbuild.target.gnu.builder">
</builder>
<tool
id="cdt.managedbuild.tool.compiler.xlupc.so.debug"
superClass="org.eclipse.cdt.managedbuilder.xlupc.ui.compiler">
<option
defaultValue="xlc.c.optimization.level.none"
id="cdt.managedbuild.compiler.option.xlupc.so.debug.optimization.level"
superClass="xlc.c.compiler.option.optimization.level">
</option>
<option
defaultValue="true"
id="cdt.managedbuild.compiler.option.xlupc.so.debug.debugging.g"
superClass="xlc.c.compiler.option.ecd.g">
</option>
</tool>
<tool
id="cdt.managedbuild.tool.linker.xlupc.so.debug"
superClass="cdt.managedbuild.tool.xlc.c.linker.so">
</tool>
<tool
id="cdt.managedbuild.tool.assembler.xlupc.so.debug"
superClass="cdt.managedbuild.tool.xlc.assembler">
</tool>
</toolChain>
</configuration>
<configuration
artifactExtension="so"
cleanCommand="rm -rf"
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
id="cdt.managedbuild.config.xlupc.so.release"
name="%ConfigName.Rel">
<toolChain
id="cdt.managedbuild.toolchain.xlupc.so.release"
name="%ToolChainName.Upc"
targetTool="cdt.managedbuild.tool.linker.xlupc.so.release">
<targetPlatform
archList="all"
binaryParser="org.eclipse.cdt.core.XCOFF32"
id="cdt.managedbuild.targetplatform.xlupc.so.release"
name="%PlatformName.Rel"
osList="all">
</targetPlatform>
<builder
id="cdt.managedbuild.builder.xlupc.so.release"
superClass="cdt.managedbuild.target.gnu.builder">
</builder>
<tool
id="cdt.managedbuild.tool.compiler.xlupc.so.release"
superClass="org.eclipse.cdt.managedbuilder.xlupc.ui.compiler">
<option
defaultValue="xlc.c.optimization.level.Level5"
id="cdt.managedbuild.compiler.option.xlupc.so.release.optimization.level"
superClass="xlc.c.compiler.option.optimization.level">
</option>
<option
defaultValue="false"
id="cdt.managedbuild.compiler.option.xlupc.so.release.debugging.g"
superClass="xlc.c.compiler.option.ecd.g">
</option>
</tool>
<tool
id="cdt.managedbuild.tool.linker.xlupc.so.release"
superClass="cdt.managedbuild.tool.xlc.c.linker.so">
</tool>
<tool
id="cdt.managedbuild.tool.assembler.xlupc.so.release"
superClass="cdt.managedbuild.tool.xlc.assembler">
</tool>
</toolChain>
</configuration>
</projectType>
<projectType
buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.xlupc.staticLib"
id="cdt.managedbuild.target.xlupc.lib"
isAbstract="false"
isTest="false"
name="%TargetName.xlupc.lib"
projectMacroSupplier="org.eclipse.cdt.managedbuilder.xlc.ui.XLCProjectMacroSupplier">
<configuration
artifactExtension="lib"
cleanCommand="rm -rf"
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
id="cdt.managedbuild.config.xlupc.lib.debug"
name="%ConfigName.Dbg">
<toolChain
id="cdt.managedbuild.toolchain.xlupc.lib.debug"
name="%ToolChainName.Upc"
targetTool="cdt.managedbuild.tool.archiver.xlupc.lib.debug">
<targetPlatform
archList="all"
binaryParser="org.eclipse.cdt.core.XCOFF32"
id="cdt.managedbuild.targetplatform.xlupc.lib.debug"
name="%PlatformName.Dbg"
osList="all">
</targetPlatform>
<builder
id="cdt.managedbuild.builder.xlupc.lib.debug"
superClass="cdt.managedbuild.target.gnu.builder">
</builder>
<tool
id="cdt.managedbuild.tool.compiler.xlupc.lib.debug"
superClass="org.eclipse.cdt.managedbuilder.xlupc.ui.compiler">
<option
defaultValue="xlc.c.optimization.level.none"
id="cdt.managedbuild.compiler.option.xlupc.lib.debug.optimization.level"
superClass="xlc.c.compiler.option.optimization.level">
</option>
<option
defaultValue="true"
id="cdt.managedbuild.compiler.option.xlupc.lib.debug.debugging.g"
superClass="xlc.c.compiler.option.ecd.g">
</option>
</tool>
<tool
id="cdt.managedbuild.tool.archiver.xlupc.lib.debug"
superClass="cdt.managedbuild.tool.xlc.archiver">
</tool>
<tool
id="cdt.managedbuild.tool.assembler.xlupc.lib.debug"
superClass="cdt.managedbuild.tool.xlc.assembler">
</tool>
</toolChain>
</configuration>
<configuration
artifactExtension="lib"
cleanCommand="rm -rf"
errorParsers="org.eclipse.cdt.errorparsers.xlc.XlcErrorParser"
id="cdt.managedbuild.config.xlupc.lib.release"
name="%ConfigName.Rel">
<toolChain
id="cdt.managedbuild.toolchain.xlupc.lib.release"
name="%ToolChainName.Upc"
targetTool="cdt.managedbuild.tool.archiver.xlupc.lib.release">
<targetPlatform
archList="all"
binaryParser="org.eclipse.cdt.core.XCOFF32"
id="cdt.managedbuild.targetplatform.xlupc.lib.release"
name="%PlatformName.Rel"
osList="all">
</targetPlatform>
<builder
id="cdt.managedbuild.builder.xlupc.lib.release"
superClass="cdt.managedbuild.target.gnu.builder">
</builder>
<tool
id="cdt.managedbuild.tool.compiler.xlupc.lib.release"
superClass="org.eclipse.cdt.managedbuilder.xlupc.ui.compiler">
<option
defaultValue="xlc.c.optimization.level.Level5"
id="cdt.managedbuild.compiler.option.xlupc.lib.release.optimization.level"
superClass="xlc.c.compiler.option.optimization.level">
</option>
<option
defaultValue="false"
id="cdt.managedbuild.compiler.option.xlupc.lib.release.debugging.g"
superClass="xlc.c.compiler.option.ecd.g">
</option>
</tool>
<tool
id="cdt.managedbuild.tool.archiver.xlupc.lib.release"
superClass="cdt.managedbuild.tool.xlc.archiver">
</tool>
<tool
id="cdt.managedbuild.tool.assembler.xlupc.lib.release"
superClass="cdt.managedbuild.tool.xlc.assembler">
</tool>
</toolChain>
</configuration>
</projectType>
<tool
command="${XL_compilerRoot}/xlupc"
id="org.eclipse.cdt.managedbuilder.xlupc.ui.compiler"
isAbstract="true"
name="%ToolName.compiler.xlupc"
natureFilter="cnature"
outputFlag="-o"
superClass="cdt.managedbuild.tool.xlc.cpp.compiler">
</tool>
</extension>
<extension
point="org.eclipse.cdt.managedbuilder.ui.newWizardPages">
<wizardPage
ID="org.eclipse.cdt.managedbuilder.xlupc.ui.wizards.XLUpcSettingsWizardPage"
operationClass="org.eclipse.cdt.managedbuilder.xlupc.ui.wizards.XLUpcSettingsWizardRunnable"
pageClass="org.eclipse.cdt.managedbuilder.xlupc.ui.wizards.XLUpcSettingsWizardPage">
<projectType
projectTypeID="cdt.managedbuild.target.xlupc.exe">
</projectType>
<projectType
projectTypeID="cdt.managedbuild.target.xlupc.so">
</projectType>
<projectType
projectTypeID="cdt.managedbuild.target.xlupc.lib">
</projectType>
</wizardPage>
</extension>
<extension
point="org.eclipse.ui.newWizards">
<category
id="cdt.managedbuild.wizardcategory.upc"
name="%category.name.1">
</category>
<wizard
canFinishEarly="false"
category="cdt.managedbuild.wizardcategory.upc"
class="org.eclipse.cdt.managedbuilder.xlupc.ui.wizards.UpcProjectWizard"
hasPages="true"
icon="icons/c-project.gif"
id="cdt.managedbuilder.wizard.upc"
name="%wizard.name.1"
project="true">
</wizard>
</extension>
<extension
id="baseProperties"
name="Base Build Properties Definition"
point="org.eclipse.cdt.managedbuilder.core.buildProperties">
<propertyValue
id="org.eclipse.cdt.build.core.buildArtefactType.xlupc.exe"
name="%BuildProperty.type.name.xlupc.executable"
property="org.eclipse.cdt.build.core.buildArtefactType">
</propertyValue>
<propertyValue
id="org.eclipse.cdt.build.core.buildArtefactType.xlupc.staticLib"
name="%BuildProperty.type.name.xlupc.staticLibrary"
property="org.eclipse.cdt.build.core.buildArtefactType">
</propertyValue>
<propertyValue
id="org.eclipse.cdt.build.core.buildArtefactType.xlupc.sharedLib"
name="%BuildProperty.type.name.xlupc.sharedLibrary"
property="org.eclipse.cdt.build.core.buildArtefactType">
</propertyValue>
</extension>
</plugin>

View file

@ -0,0 +1,42 @@
/*******************************************************************************
* Copyright (c) 2009 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 Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.xlupc.ui;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin {
public static final String PLUGIN_ID = "org.eclipse.cdt.managedbuilder.xlupc.ui"; //$NON-NLS-1$
private static Activator plugin;
public Activator() {
}
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
}
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);
}
public static Activator getDefault() {
return plugin;
}
}

View file

@ -0,0 +1,30 @@
/*******************************************************************************
* Copyright (c) 2009 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 Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.xlupc.ui;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.cdt.managedbuilder.xlupc.ui.messages"; //$NON-NLS-1$
static {
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
private Messages() {}
public static String UpcProjectWizard_0;
public static String UpcProjectWizard_1;
public static String XLUpcSettingsWizardPage_0;
public static String XLUpcSettingsWizardPage_1;
}

View file

@ -0,0 +1,16 @@
###############################################################################
# Copyright (c) 2009 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 Corporation - initial API and implementation
###############################################################################
UpcProjectWizard_0=UPC Project
UpcProjectWizard_1=Create UPC project of selected type
XLUpcSettingsWizardPage_0=XL UPC Settings
XLUpcSettingsWizardPage_1=XL Compiler Settings

View file

@ -0,0 +1,95 @@
/*******************************************************************************
* Copyright (c) 2009 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.managedbuilder.xlupc.ui.wizards;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.cdt.core.CProjectNature;
import org.eclipse.cdt.managedbuilder.xlupc.ui.Messages;
import org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard;
import org.eclipse.cdt.ui.wizards.CDTMainWizardPage;
import org.eclipse.cdt.ui.wizards.EntryDescriptor;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
@SuppressWarnings({ "nls", "serial" })
public class UpcProjectWizard extends CDTCommonProjectWizard {
private static final String ARTIFACT_TYPE_UPC_EXE = "org.eclipse.cdt.build.core.buildArtefactType.xlupc.exe";
private static final String ARTIFACT_TYPE_UPC_EXE_DEFAULT = ARTIFACT_TYPE_UPC_EXE + ".default";
private static final String ARTIFACT_TYPE_UPC_SO = "org.eclipse.cdt.build.core.buildArtefactType.xlupc.sharedLib";
private static final String ARTIFACT_TYPE_UPC_SO_DEFAULT = ARTIFACT_TYPE_UPC_SO + ".default";
private static final String ARTIFACT_TYPE_UPC_LIB = "org.eclipse.cdt.build.core.buildArtefactType.xlupc.staticLib";
private static final String ARTIFACT_TYPE_UPC_LIB_DEFAULT = ARTIFACT_TYPE_UPC_LIB + ".default";
private final static String PAGE_NAME = "org.eclipse.cdt.managedbuilder.xlupc.ui.mainpage";
private static final Set<String> ALL_TYPES = new HashSet<String>() {{
add(ARTIFACT_TYPE_UPC_EXE);
add(ARTIFACT_TYPE_UPC_EXE_DEFAULT);
add(ARTIFACT_TYPE_UPC_SO);
add(ARTIFACT_TYPE_UPC_SO_DEFAULT);
add(ARTIFACT_TYPE_UPC_LIB);
add(ARTIFACT_TYPE_UPC_LIB_DEFAULT);
}};
public UpcProjectWizard() {
super(Messages.UpcProjectWizard_0, Messages.UpcProjectWizard_1);
}
public void addPages() {
fMainPage = new CDTMainWizardPage(PAGE_NAME) {
@SuppressWarnings("unchecked")
public List filterItems(List items) {
// filter out all non-UPC project types
if (items != null) {
Iterator iter = items.iterator();
while (iter.hasNext()) {
EntryDescriptor entryDescriptor = (EntryDescriptor) iter.next();
if(!ALL_TYPES.contains(entryDescriptor.getId()))
iter.remove();
}
}
return items;
}
};
fMainPage.setTitle(Messages.UpcProjectWizard_0);
fMainPage.setDescription(Messages.UpcProjectWizard_1);
addPage(fMainPage);
}
protected IProject continueCreation(IProject prj) {
try {
CProjectNature.addCNature(prj, new NullProgressMonitor());
} catch (CoreException e) {}
return prj;
}
public String[] getNatures() {
return new String[] { CProjectNature.C_NATURE_ID/*, CCProjectNature.CC_NATURE_ID, RemoteNature.REMOTE_NATURE_ID*/};
}
}

View file

@ -0,0 +1,40 @@
/*******************************************************************************
* Copyright (c) 2009 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 Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.xlupc.ui.wizards;
import org.eclipse.cdt.managedbuilder.xlc.ui.wizards.XLCSettingsWizardPage;
import org.eclipse.cdt.managedbuilder.xlupc.ui.Messages;
/**
*
*/
public class XLUpcSettingsWizardPage extends XLCSettingsWizardPage {
public static final String PAGE_ID = "org.eclipse.cdt.managedbuilder.xlupc.ui.wizards.XLUpcSettingsWizardPage"; //$NON-NLS-1$
public XLUpcSettingsWizardPage(String pageID) {
super(pageID);
}
public XLUpcSettingsWizardPage() {
super();
pageID = PAGE_ID;
}
public String getName() {
return Messages.XLUpcSettingsWizardPage_0;
}
public String getTitle() {
return Messages.XLUpcSettingsWizardPage_1;
}
}

View file

@ -0,0 +1,77 @@
/*******************************************************************************
* Copyright (c) 2009 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 Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.xlupc.ui.wizards;
import java.lang.reflect.InvocationTargetException;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.dom.upc.UPCLanguage;
import org.eclipse.cdt.core.language.ProjectLanguageConfiguration;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.LanguageManager;
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.managedbuilder.ui.wizards.MBSCustomPageManager;
import org.eclipse.cdt.managedbuilder.xlc.ui.wizards.XLCSettingsWizardRunnable;
import org.eclipse.cdt.ui.wizards.CDTCommonProjectWizard;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.core.runtime.content.IContentTypeManager;
import org.eclipse.jface.wizard.IWizardPage;
public class XLUpcSettingsWizardRunnable extends XLCSettingsWizardRunnable {
// now add UPC language mapping to the project
private static final String[] CONTENT_TYPE_IDS = { CCorePlugin.CONTENT_TYPE_CHEADER, CCorePlugin.CONTENT_TYPE_CSOURCE };
public XLUpcSettingsWizardRunnable() {
pageId = XLUpcSettingsWizardPage.PAGE_ID;
}
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
super.run(monitor);
// get a handle to the wizard
IWizardPage[] pages = MBSCustomPageManager.getPages();
if (pages != null && pages.length > 0) {
CDTCommonProjectWizard wizard = (CDTCommonProjectWizard) pages[0].getWizard();
IProject project = wizard.getLastProject();
LanguageManager langManager = LanguageManager.getInstance();
try {
ProjectLanguageConfiguration langConfig = langManager.getLanguageConfiguration(project);
ICProjectDescription projectDescription = CoreModel.getDefault().getProjectDescription(project, false);
ICConfigurationDescription configDescription = projectDescription.getActiveConfiguration();
IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
for(String id : CONTENT_TYPE_IDS) {
if(contentTypeManager.getContentType(id) != null) {
langConfig.addContentTypeMapping(configDescription, id, UPCLanguage.ID);
}
}
langManager.storeLanguageMappingConfiguration(project, new IContentType[0]);
} catch (CoreException e) {
CCorePlugin.log(e);
}
}
}
}