summaryrefslogtreecommitdiff
path: root/eclipse/Slice2javaPlugin/src/com/zeroc/slice2javaplugin/builder/Slice2JavaNature.java
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2011-12-10 01:57:19 +0100
committerJose <jose@zeroc.com>2011-12-10 01:57:19 +0100
commit42e31f18dc2f34c6b0c427ca0a976ac795349864 (patch)
tree91f81872e55f06c5d6b859039e3c2a633c70c684 /eclipse/Slice2javaPlugin/src/com/zeroc/slice2javaplugin/builder/Slice2JavaNature.java
parentICE-4705 voip glacier2 configuration (diff)
downloadice-42e31f18dc2f34c6b0c427ca0a976ac795349864.tar.bz2
ice-42e31f18dc2f34c6b0c427ca0a976ac795349864.tar.xz
ice-42e31f18dc2f34c6b0c427ca0a976ac795349864.zip
Eclipse plug-in updates for release 3.4.2.20111024
Diffstat (limited to 'eclipse/Slice2javaPlugin/src/com/zeroc/slice2javaplugin/builder/Slice2JavaNature.java')
-rw-r--r--eclipse/Slice2javaPlugin/src/com/zeroc/slice2javaplugin/builder/Slice2JavaNature.java108
1 files changed, 0 insertions, 108 deletions
diff --git a/eclipse/Slice2javaPlugin/src/com/zeroc/slice2javaplugin/builder/Slice2JavaNature.java b/eclipse/Slice2javaPlugin/src/com/zeroc/slice2javaplugin/builder/Slice2JavaNature.java
deleted file mode 100644
index af9710ee4b8..00000000000
--- a/eclipse/Slice2javaPlugin/src/com/zeroc/slice2javaplugin/builder/Slice2JavaNature.java
+++ /dev/null
@@ -1,108 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
-//
-// This plug-in 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.
-//
-// **********************************************************************
-
-package com.zeroc.slice2javaplugin.builder;
-
-import org.eclipse.core.resources.ICommand;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
-import org.eclipse.core.resources.IProjectNature;
-import org.eclipse.core.runtime.CoreException;
-
-import com.zeroc.slice2javaplugin.internal.Configuration;
-
-public class Slice2JavaNature implements IProjectNature
-{
- /**
- * ID of this project nature
- */
- public static final String NATURE_ID = "com.zeroc.Slice2JavaPlugin.Slice2JavaNature";
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.resources.IProjectNature#configure()
- */
- public void configure()
- throws CoreException
- {
- IProjectDescription desc = _project.getDescription();
- ICommand[] commands = desc.getBuildSpec();
-
- for(int i = 0; i < commands.length; ++i)
- {
- if(commands[i].getBuilderName().equals(Slice2JavaBuilder.BUILDER_ID))
- {
- return;
- }
- }
-
- ICommand[] newCommands = new ICommand[commands.length + 1];
- System.arraycopy(commands, 0, newCommands, 1, commands.length);
- ICommand command = desc.newCommand();
- command.setBuilderName(Slice2JavaBuilder.BUILDER_ID);
- newCommands[0] = command;
- desc.setBuildSpec(newCommands);
-
- _project.setDescription(desc, null);
-
- // Initialize a new configuration for this project.
- Configuration config = new Configuration(_project);
- config.initialize();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.resources.IProjectNature#deconfigure()
- */
- public void deconfigure()
- throws CoreException
- {
- IProjectDescription description = getProject().getDescription();
- ICommand[] commands = description.getBuildSpec();
- for(int i = 0; i < commands.length; ++i)
- {
- if(commands[i].getBuilderName().equals(Slice2JavaBuilder.BUILDER_ID))
- {
- ICommand[] newCommands = new ICommand[commands.length - 1];
- System.arraycopy(commands, 0, newCommands, 0, i);
- System.arraycopy(commands, i + 1, newCommands, i, commands.length - i - 1);
- description.setBuildSpec(newCommands);
- return;
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.resources.IProjectNature#getProject()
- */
- public IProject getProject()
- {
- return _project;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core
- * .resources.IProject)
- */
- public void setProject(IProject project)
- {
- _project = project;
- }
-
-
- private IProject _project;
-}