Skip to Content.
Sympa Menu

notify-dpml - svn commit: r1973 - development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: peter AT neubauer.se
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r1973 - development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic
  • Date: Tue, 08 Mar 2005 06:12:38 -0500

Author: peter AT neubauer.se
Date: Tue Mar 8 06:12:38 2005
New Revision: 1973

Added:

development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/BuildActionDelegate.java
Log:
dding a builder action


Added:
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/BuildActionDelegate.java
==============================================================================
--- (empty file)
+++
development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic/BuildActionDelegate.java
Tue Mar 8 06:12:38 2005
@@ -0,0 +1,102 @@
+/*
+ * Created on 2005-mar-04
+ *
+ */
+package net.dpml.ide.eclipse.plugins.magic;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.TreeMap;
+import java.util.prefs.Preferences;
+
+import net.dpml.ide.common.magic.IdeIndex;
+import net.dpml.ide.common.magic.IdeProjectDefinition;
+
+import org.eclipse.ant.core.AntCorePlugin;
+import org.eclipse.ant.core.AntCorePreferences;
+import org.eclipse.ant.core.IAntClasspathEntry;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ProjectScope;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.core.ClasspathEntry;
+import org.eclipse.jdt.internal.core.JavaProject;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.actions.SelectionListenerAction;
+import org.eclipse.ui.internal.Workbench;
+import org.osgi.service.prefs.BackingStoreException;
+
+
+public class BuildActionDelegate extends SelectionListenerAction implements
IObjectActionDelegate
+{
+
+
+ protected BuildActionDelegate( String text )
+ {
+ super( text );
+ }
+
+ public BuildActionDelegate()
+ {
+ this("Magic Build Action");
+ }
+ private ILog log = MagicPlugin.getDefault().getLog();
+ private IFile mBuildFile;;
+ public void setActivePart( IAction iAction, IWorkbenchPart iTargetPart )
+ {
+
+ }
+
+ public void run( IAction iAction )
+ {
+ URL[] antClasspath= null;
+ AntCorePreferences prefs= AntCorePlugin.getPlugin().getPreferences();
+ antClasspath= prefs.getURLs();
+ URL[] extraClasspath= prefs.getExtraClasspathURLs();
+ IAntClasspathEntry[] customCP =
prefs.getContributedClasspathEntries();
+ IAntClasspathEntry[] coreClasspath =
prefs.getAntHomeClasspathEntries();
+ IAntClasspathEntry test = customCP[0];
+ //antClasspath= new URL[customClasspath.length +
extraClasspath.length];
+ //System.arraycopy(customClasspath, 0, antClasspath, 0,
customClasspath.length);
+ //System.arraycopy(extraClasspath, 0, antClasspath,
customClasspath.length, extraClasspath.length);
+ }
+
+ public void selectionChanged( IAction iAction, ISelection iSelection )
+ {
+ if (iSelection.isEmpty())
+ {
+ return;
+ }
+ StructuredSelection selection = (StructuredSelection)iSelection;
+ mBuildFile = (IFile)selection.getFirstElement();
+ }
+ /**
+ * The <code>DeleteResourceAction</code> implementation of this
+ * <code>SelectionListenerAction</code> method disables the action
+ * if the selection contains phantom resources or non-resources
+ */
+ protected boolean updateSelection(IStructuredSelection selection) {
+ return super.updateSelection(selection);
+ }
+}



  • svn commit: r1973 - development/laboratory/ide/eclipse/magic/plugin/src/net/dpml/ide/eclipse/plugins/magic, peter, 03/07/2005

Archive powered by MHonArc 2.6.24.

Top of Page