Commit 51beb552 authored by David Feliot's avatar David Feliot
Browse files

No commit message

No commit message
parent 4af5ae3a

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="lib/apollon-runtime-1.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/asm-3.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/bsh-2.0b4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/commandline-1.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/commons-net-1.4.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/docbook-xsl-1.72.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/dtdparser-1.21.jar"/>
<classpathentry exported="true" kind="lib" path="lib/dumper-0.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/explorer-1.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/explorer-reflector-plugin-1.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/fdf-core-2.2-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="lib/FDF-FDF-2.2-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="lib/fdf-fraclet-plugins-2.2-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="lib/fdf-fractal-adl-2.2-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="lib/FDF-HTTP-2.2-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="lib/FDF-JAVA-2.2-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="lib/FDF-JORAM.jar"/>
<classpathentry exported="true" kind="lib" path="lib/fdf-launcher-2.2-SNAPSHOT.jar"/>
<classpathentry exported="true" kind="lib" path="lib/fractal-api-2.0.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/fractal-explorer-1.1.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/fractal-rmi-0.3.5.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jdom-1.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jgraph-5.8.3.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jonathan-3.0.10.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jsch-0.1.29.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jtelnet-1.0.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/julia-asm-2.5.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/julia-mixins-2.5.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/julia-runtime-2.5.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/log4j-1.2.13.jar"/>
<classpathentry exported="true" kind="lib" path="lib/monolog-2.1.8.jar"/>
<classpathentry exported="true" kind="lib" path="lib/oro-2.0.8.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ow-misc-1.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/ow-trace-1.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/truezip-6.6.jar"/>
<classpathentry exported="true" kind="lib" path="lib/wsdl4j-1.6.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xalan-2.7.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xercesImpl-2.3.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xml-apis-1.0.b2.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.ow2.joram.design.deploy</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>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.ow2.joram.design.deploy; singleton:=true
Bundle-Version: 1.0.0.qualifier
Require-Bundle: org.eclipse.ui,
org.eclipse.emf.ecore.xmi,
org.eclipse.core.resources,
org.eclipse.core.runtime,
org.ow2.joram.design,
org.eclipse.ui.console,
org.eclipse.ui.ide
Bundle-Vendor: %providerName
Bundle-ClassPath: .,
lib/apollon-runtime-1.0.jar,
lib/asm-3.0.jar,
lib/bsh-2.0b4.jar,
lib/commandline-1.0.jar,
lib/commons-net-1.4.1.jar,
lib/docbook-xsl-1.72.0.jar,
lib/dtdparser-1.21.jar,
lib/dumper-0.1.jar,
lib/explorer-1.0.jar,
lib/explorer-reflector-plugin-1.0.jar,
lib/fdf-core-2.2-SNAPSHOT.jar,
lib/FDF-FDF-2.2-SNAPSHOT.jar,
lib/fdf-fraclet-plugins-2.2-SNAPSHOT.jar,
lib/fdf-fractal-adl-2.2-SNAPSHOT.jar,
lib/FDF-HTTP-2.2-SNAPSHOT.jar,
lib/FDF-JAVA-2.2-SNAPSHOT.jar,
lib/FDF-JORAM.jar,
lib/fdf-launcher-2.2-SNAPSHOT.jar,
lib/fractal-api-2.0.2.jar,
lib/fractal-explorer-1.1.2.jar,
lib/fractal-rmi-0.3.5.jar,
lib/jdom-1.0.jar,
lib/jgraph-5.8.3.1.jar,
lib/jonathan-3.0.10.jar,
lib/jsch-0.1.29.jar,
lib/jtelnet-1.0.0.jar,
lib/julia-asm-2.5.2.jar,
lib/julia-mixins-2.5.2.jar,
lib/julia-runtime-2.5.2.jar,
lib/log4j-1.2.13.jar,
lib/monolog-2.1.8.jar,
lib/oro-2.0.8.jar,
lib/ow-misc-1.0.jar,
lib/ow-trace-1.0.jar,
lib/truezip-6.6.jar,
lib/wsdl4j-1.6.1.jar,
lib/xalan-2.7.0.jar,
lib/xercesImpl-2.3.0.jar,
lib/xml-apis-1.0.b2.jar
Bundle-Activator: org.ow2.joram.design.deploy.JoramDeployPlugin
Bundle-ActivationPolicy: lazy
# Copyright (C) 2010 ScalAgent Distributed Technologies
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Initial developer(s): ScalAgent Distributed Technologies
# Contributor(s):
output.. = bin/
source.. = src/
bin.includes = plugin.xml,\
META-INF/,\
.,\
plugin.properties,\
lib/,\
lib/apollon-runtime-1.0.jar,\
lib/asm-3.0.jar,\
lib/bsh-2.0b4.jar,\
lib/commandline-1.0.jar,\
lib/commons-net-1.4.1.jar,\
lib/docbook-xsl-1.72.0.jar,\
lib/dtdparser-1.21.jar,\
lib/dumper-0.1.jar,\
lib/explorer-1.0.jar,\
lib/explorer-reflector-plugin-1.0.jar,\
lib/fdf-core-2.2-SNAPSHOT.jar,\
lib/FDF-FDF-2.2-SNAPSHOT.jar,\
lib/fdf-fraclet-plugins-2.2-SNAPSHOT.jar,\
lib/fdf-fractal-adl-2.2-SNAPSHOT.jar,\
lib/FDF-HTTP-2.2-SNAPSHOT.jar,\
lib/FDF-JAVA-2.2-SNAPSHOT.jar,\
lib/FDF-JORAM.jar,\
lib/fdf-launcher-2.2-SNAPSHOT.jar,\
lib/fractal-api-2.0.2.jar,\
lib/fractal-explorer-1.1.2.jar,\
lib/fractal-rmi-0.3.5.jar,\
lib/jdom-1.0.jar,\
lib/jgraph-5.8.3.1.jar,\
lib/jonathan-3.0.10.jar,\
lib/jsch-0.1.29.jar,\
lib/jtelnet-1.0.0.jar,\
lib/julia-asm-2.5.2.jar,\
lib/julia-mixins-2.5.2.jar,\
lib/julia-runtime-2.5.2.jar,\
lib/log4j-1.2.13.jar,\
lib/monolog-2.1.8.jar,\
lib/oro-2.0.8.jar,\
lib/ow-misc-1.0.jar,\
lib/ow-trace-1.0.jar,\
lib/truezip-6.6.jar,\
lib/wsdl4j-1.6.1.jar,\
lib/xalan-2.7.0.jar,\
lib/xercesImpl-2.3.0.jar,\
lib/xml-apis-1.0.b2.jar
# Copyright (C) 2010 ScalAgent Distributed Technologies
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
#
# Initial developer(s): ScalAgent Distributed Technologies
# Contributor(s):
pluginName = Joram Designer Deployment
providerName = ScalAgent D.T.
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
Copyright (C) 2010 ScalAgent Distributed Technologies
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
Initial developer(s): ScalAgent Distributed Technologies
Contributor(s):
-->
<plugin>
<extension
point="org.eclipse.ui.popupMenus">
<objectContribution
id="org.ow2.joram.design.deploy.contribution1"
nameFilter="*.joram"
objectClass="org.eclipse.core.resources.IFile">
<action
label="Deploy..."
class="org.ow2.joram.design.deploy.actions.DeployAction"
menubarPath="org.ow2.joram.design.menu/deploy"
enablesFor="1"
id="org.ow2.joram.design.deploy.DeployAction">
</action>
</objectContribution>
</extension>
</plugin>
/*
* Copyright (C) 2010 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): ScalAgent Distributed Technologies
* Contributor(s):
*/
package org.ow2.joram.design.deploy;
import org.eclipse.ui.plugin.AbstractUIPlugin;
public class JoramDeployPlugin extends AbstractUIPlugin {
public static final String ID = "org.ow2.joram.design.deploy";
private static JoramDeployPlugin plugin;
public JoramDeployPlugin() {
plugin = this;
}
public static JoramDeployPlugin getDefault() {
return plugin;
}
}
/*
* Copyright (C) 2010 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): ScalAgent Distributed Technologies
* Contributor(s):
*/
package org.ow2.joram.design.deploy.actions;
import org.eclipse.core.resources.IFile;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IActionDelegate;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.ow2.joram.design.deploy.actions.wizard.DeployWizard;
import org.ow2.joram.design.model.joram.Config;
import org.ow2.joram.design.model.joram.JoramPackage;
import org.ow2.joram.design.model.joram.ScalAgentServer;
public class DeployAction implements IObjectActionDelegate {
private Shell shell;
private ISelection selection;
public DeployAction() {
super();
}
/**
* @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
*/
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
shell = targetPart.getSite().getShell();
}
/**
* @see IActionDelegate#run(IAction)
*/
public void run(IAction action) {
if (selection instanceof TreeSelection) {
final TreeSelection tree = (TreeSelection) selection;
final Object o = tree.getFirstElement();
if (o instanceof IFile) {
try {
final IFile joramModelFile = (IFile) o;
final JoramPackage ePackage = JoramPackage.eINSTANCE;
// Create resource set and register your generated resource factory.
final ResourceSet resourceSet = new ResourceSetImpl();
resourceSet.getPackageRegistry().put(ePackage.getNsURI(), ePackage);
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("joram",
new XMIResourceFactoryImpl());
final Resource resource = resourceSet.getResource(URI.createFileURI(joramModelFile.getLocationURI()
.getPath()), true);
final Config rootElement = (Config) resource.getContents().get(0);
for (ScalAgentServer server : rootElement.getServers()) {
if (server.getHost() == null) {
throw new Exception("Can't deploy when a server has no host defined.");
}
}
WizardDialog wizard = new WizardDialog(shell, new DeployWizard(rootElement, tree));
wizard.setHelpAvailable(false);
wizard.setPageSize(300, 250);
wizard.open();
} catch (Exception e) {
MessageDialog.openError(shell, "Deploy Plug-in", "Deployment failed: "
+ e.getMessage());
}
}
}
}
/**
* @see IActionDelegate#selectionChanged(IAction, ISelection)
*/
public void selectionChanged(IAction action, ISelection selection) {
this.selection = selection;
}
}
/*
* Copyright (C) 2010 ScalAgent Distributed Technologies
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA.
*
* Initial developer(s): ScalAgent Distributed Technologies
* Contributor(s):
*/
package org.ow2.joram.design.deploy.actions;
import java.io.PrintStream;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.ui.console.ConsolePlugin;
import org.eclipse.ui.console.IConsole;
import org.eclipse.ui.console.IConsoleManager;
import org.eclipse.ui.console.MessageConsole;
import org.objectweb.fdf.components.fdf.lib.runnable.Launcher;
import org.objectweb.fdf.util.printer.lib.io.PrintStreamPrinterFactory;
import org.ow2.joram.design.deploy.JoramDeployPlugin;
public class FdfJob extends Job {
public static final String INSTALL_ACTION = "install";
public static final String START_ACTION = "start";
public static final String STOP_ACTION = "stop";
public static final String UNINSTALL_ACTION = "uninstall";
private String action;
private String path;
public FdfJob(String path, String action) {
super("FDF deployment.");
this.path = path;
this.action = action;
}
protected IStatus run(IProgressMonitor monitor) {
System.setProperty("fractal.provider", "org.objectweb.fractal.julia.Julia");
System.setProperty("julia.config", "fdf-julia.cfg");
monitor.beginTask("Deploying configuration", IProgressMonitor.UNKNOWN);
MessageConsole console = findConsole("FDF");
console.activate();
PrintStreamPrinterFactory.printStream = new PrintStream(console.newOutputStream());
try {
String[] args = { "-fractal", Launcher.class.getName() + "(" + path + "," + action + ",,,,,)", "r" };
org.objectweb.fractal.adl.Launcher.main(args);
} catch (Exception exc) {
return new Status(IStatus.ERROR, JoramDeployPlugin.ID, exc.getMessage(), exc);
}
monitor.done();