Commit bc781958f0304a8cf9f5aee5f7cf4b54970b11bc

Authored by Jean-Marie Gauthier
1 parent f902ce56c4
Exists in master and in 1 other branch develop

"Add jar and utils package"

Showing 29 changed files with 214 additions and 18 deletions Side-by-side Diff

fr.femtost.disc.eclipse.sysml2problem.atl/src/fr/femtost/disc/eclipse/sysml2problem/atl/transformation/sysml2problem.asm View file @ bc78195
... ... @@ -704,23 +704,23 @@
704 704 <constant value="87:48-87:90"/>
705 705 <constant value="87:2-87:91"/>
706 706 <constant value="isPlusStereotyped"/>
707   - <constant value="vhdlams-profile::plus"/>
  707 + <constant value="vhdlamsforsysml.profile::plus"/>
708 708 <constant value="90:2-90:6"/>
709 709 <constant value="90:2-90:30"/>
710 710 <constant value="90:43-90:44"/>
711 711 <constant value="90:43-90:58"/>
712   - <constant value="90:61-90:84"/>
713   - <constant value="90:43-90:84"/>
714   - <constant value="90:2-90:85"/>
  712 + <constant value="90:61-90:92"/>
  713 + <constant value="90:43-90:92"/>
  714 + <constant value="90:2-90:93"/>
715 715 <constant value="isMinusStereotyped"/>
716   - <constant value="vhdlams-profile::minus"/>
  716 + <constant value="vhdlamsforsysml.profile::minus"/>
717 717 <constant value="93:2-93:6"/>
718 718 <constant value="93:2-93:30"/>
719 719 <constant value="93:43-93:44"/>
720 720 <constant value="93:43-93:58"/>
721   - <constant value="93:61-93:85"/>
722   - <constant value="93:43-93:85"/>
723   - <constant value="93:2-93:86"/>
  721 + <constant value="93:61-93:93"/>
  722 + <constant value="93:43-93:93"/>
  723 + <constant value="93:2-93:94"/>
724 724 <constant value="containsMinusFlowPort"/>
725 725 <constant value="ownedAttribute"/>
726 726 <constant value="J.isMinusStereotyped():J"/>
fr.femtost.disc.eclipse.sysml2problem.atl/src/fr/femtost/disc/eclipse/sysml2problem/atl/transformation/sysml2problem.atl View file @ bc78195
... ... @@ -87,10 +87,10 @@
87 87 thisModule.allSharedAssociation()->exists(a | a.ownedEnd->exists(e | e.type = self.type));
88 88  
89 89 helper context MMuml!Element def: isPlusStereotyped() : Boolean =
90   - self.getAppliedStereotypes()->exists(s | s.qualifiedName = 'vhdlams-profile::plus');
  90 + self.getAppliedStereotypes()->exists(s | s.qualifiedName = 'vhdlamsforsysml.profile::plus');
91 91  
92 92 helper context MMuml!Element def: isMinusStereotyped() : Boolean =
93   - self.getAppliedStereotypes()->exists(s | s.qualifiedName = 'vhdlams-profile::minus');
  93 + self.getAppliedStereotypes()->exists(s | s.qualifiedName = 'vhdlamsforsysml.profile::minus');
94 94  
95 95 helper context MMsysml!Block def: containsMinusFlowPort() : Boolean =
96 96 self.ownedAttribute->select(f | f.oclIsTypeOf(MMsysml!FlowPort))->exists(fp | fp.isMinusStereotyped());
fr.femtost.disc.eclipse.sysml2problem.ui/META-INF/MANIFEST.MF View file @ bc78195
... ... @@ -12,5 +12,6 @@
12 12 Bundle-ActivationPolicy: lazy
13 13 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
14 14 Bundle-Vendor: Femto-st / DISC
15   -Export-Package: fr.femtost.disc.eclipse.sysml2problem.ui.jobs
  15 +Export-Package: fr.femtost.disc.eclipse.sysml2problem.ui.jobs,
  16 + fr.femtost.disc.eclipse.sysml2problem.ui.utils
fr.femtost.disc.eclipse.sysml2problem.ui/src/fr/femtost/disc/eclipse/sysml2problem/ui/utils/DisplayUtil.java View file @ bc78195
  1 +/*******************************************************************************
  2 + * Copyright (c) 2013 Jean-Marie Gauthier and University of Franche-Comte
  3 + * All rights reserved. This program and the accompanying materials
  4 + * are made available under the terms of the Eclipse Public License v1.0
  5 + * which accompanies this distribution, and is available at
  6 + * http://www.eclipse.org/legal/epl-v10.html
  7 + *
  8 + * Contributors:
  9 + * Jean-Marie Gauthier and University of Franche-Comte - initial API and implementation
  10 + *******************************************************************************/
  11 +package fr.femtost.disc.eclipse.sysml2problem.ui.utils;
  12 +
  13 +import org.eclipse.core.resources.IFile;
  14 +import org.eclipse.core.resources.IMarker;
  15 +import org.eclipse.core.runtime.CoreException;
  16 +import org.eclipse.swt.widgets.Display;
  17 +
  18 +public final class DisplayUtil
  19 +{
  20 +
  21 + private DisplayUtil()
  22 + {
  23 + }
  24 +
  25 + public static void updateStatusLine(String msg)
  26 + {
  27 + Display display = Display.getDefault();
  28 + (new DisplayUtilThread(display, msg)).start();
  29 + }
  30 +
  31 + public static void addMarker(IFile file, int severity, String message, String location)
  32 + {
  33 + try
  34 + {
  35 + IMarker marker = file.createMarker("org.eclipse.core.resources.problemmarker");
  36 + if(marker.exists())
  37 + {
  38 + marker.setAttribute("message", message);
  39 + marker.setAttribute("severity", severity);
  40 + marker.setAttribute("location", location);
  41 + marker.setAttribute("userEditable", false);
  42 + }
  43 + }
  44 + catch(CoreException e)
  45 + {
  46 + e.printStackTrace();
  47 + }
  48 + }
  49 +}
fr.femtost.disc.eclipse.sysml2problem.ui/src/fr/femtost/disc/eclipse/sysml2problem/ui/utils/DisplayUtilRun.java View file @ bc78195
  1 +/*******************************************************************************
  2 + * Copyright (c) 2013 Jean-Marie Gauthier and University of Franche-Comte
  3 + * All rights reserved. This program and the accompanying materials
  4 + * are made available under the terms of the Eclipse Public License v1.0
  5 + * which accompanies this distribution, and is available at
  6 + * http://www.eclipse.org/legal/epl-v10.html
  7 + *
  8 + * Contributors:
  9 + * Jean-Marie Gauthier and University of Franche-Comte - initial API and implementation
  10 + *******************************************************************************/
  11 +package fr.femtost.disc.eclipse.sysml2problem.ui.utils;
  12 +
  13 +import org.eclipse.ui.*;
  14 +
  15 +class DisplayUtilRun implements Runnable
  16 +{
  17 +
  18 + DisplayUtilRun(DisplayUtilThread displayutil, String s)
  19 + {
  20 + super();
  21 + this.display = displayutil;
  22 + this.valmsg = s;
  23 + }
  24 +
  25 + public void run()
  26 + {
  27 + ((IViewSite)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart().getSite()).getActionBars().getStatusLineManager().setMessage(valmsg);
  28 + }
  29 +
  30 + final DisplayUtilThread display;
  31 + private final String valmsg;
  32 +}
fr.femtost.disc.eclipse.sysml2problem.ui/src/fr/femtost/disc/eclipse/sysml2problem/ui/utils/DisplayUtilThread.java View file @ bc78195
  1 +/*******************************************************************************
  2 + * Copyright (c) 2013 Jean-Marie Gauthier and University of Franche-Comte
  3 + * All rights reserved. This program and the accompanying materials
  4 + * are made available under the terms of the Eclipse Public License v1.0
  5 + * which accompanies this distribution, and is available at
  6 + * http://www.eclipse.org/legal/epl-v10.html
  7 + *
  8 + * Contributors:
  9 + * Jean-Marie Gauthier and University of Franche-Comte - initial API and implementation
  10 + *******************************************************************************/
  11 +package fr.femtost.disc.eclipse.sysml2problem.ui.utils;
  12 +
  13 +import org.eclipse.swt.widgets.Display;
  14 +
  15 +
  16 +class DisplayUtilThread extends Thread {
  17 +
  18 + private final Display display;
  19 + private final String valmsg;
  20 +
  21 + DisplayUtilThread(Display display, String s){
  22 + super();
  23 + this.display = display;
  24 + this.valmsg = s;
  25 + }
  26 +
  27 + public void run()
  28 + {
  29 + display.syncExec(new DisplayUtilRun(this, valmsg));
  30 + }
  31 +}
fr.femtost.disc.eclipse.sysml2problem.ui/src/fr/femtost/disc/eclipse/sysml2problem/ui/utils/ProblemResourceFactoryImpl.java View file @ bc78195
  1 +/*******************************************************************************
  2 + * Copyright (c) 2013 Jean-Marie Gauthier and University of Franche-Comte
  3 + * All rights reserved. This program and the accompanying materials
  4 + * are made available under the terms of the Eclipse Public License v1.0
  5 + * which accompanies this distribution, and is available at
  6 + * http://www.eclipse.org/legal/epl-v10.html
  7 + *
  8 + * Contributors:
  9 + * Jean-Marie Gauthier and University of Franche-Comte - initial API and implementation
  10 + *******************************************************************************/
  11 +package fr.femtost.disc.eclipse.sysml2problem.ui.utils;
  12 +
  13 +import org.eclipse.emf.common.util.URI;
  14 +import org.eclipse.emf.ecore.resource.Resource;
  15 +import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
  16 +
  17 +public class ProblemResourceFactoryImpl extends ResourceFactoryImpl{
  18 +
  19 + public Resource createResource(URI uri){
  20 +
  21 + Resource result = new ProblemResourceImpl(uri);
  22 + return result;
  23 + }
  24 +}
fr.femtost.disc.eclipse.sysml2problem.ui/src/fr/femtost/disc/eclipse/sysml2problem/ui/utils/ProblemResourceImpl.java View file @ bc78195
  1 +/*******************************************************************************
  2 + * Copyright (c) 2013 Jean-Marie Gauthier and University of Franche-Comte
  3 + * All rights reserved. This program and the accompanying materials
  4 + * are made available under the terms of the Eclipse Public License v1.0
  5 + * which accompanies this distribution, and is available at
  6 + * http://www.eclipse.org/legal/epl-v10.html
  7 + *
  8 + * Contributors:
  9 + * Jean-Marie Gauthier and University of Franche-Comte - initial API and implementation
  10 + *******************************************************************************/
  11 +package fr.femtost.disc.eclipse.sysml2problem.ui.utils;
  12 +
  13 +import org.eclipse.emf.common.util.URI;
  14 +import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
  15 +
  16 +public class ProblemResourceImpl extends XMIResourceImpl{
  17 +
  18 + public ProblemResourceImpl(URI uri){
  19 + super(uri);
  20 +
  21 + }
  22 +}
fr.femtost.disc.eclipse.sysml2problem.ui/src/fr/femtost/disc/eclipse/sysml2problem/ui/utils/SelectionUtil.java View file @ bc78195
  1 +/*******************************************************************************
  2 + * Copyright (c) 2013 Jean-Marie Gauthier and University of Franche-Comte
  3 + * All rights reserved. This program and the accompanying materials
  4 + * are made available under the terms of the Eclipse Public License v1.0
  5 + * which accompanies this distribution, and is available at
  6 + * http://www.eclipse.org/legal/epl-v10.html
  7 + *
  8 + * Contributors:
  9 + * Jean-Marie Gauthier and University of Franche-Comte - initial API and implementation
  10 + *******************************************************************************/
  11 +package fr.femtost.disc.eclipse.sysml2problem.ui.utils;
  12 +
  13 +import org.eclipse.core.resources.IFile;
  14 +import org.eclipse.jface.viewers.ISelection;
  15 +import org.eclipse.jface.viewers.TreeSelection;
  16 +
  17 +public final class SelectionUtil
  18 +{
  19 +
  20 + private SelectionUtil()
  21 + {
  22 + }
  23 +
  24 + public static IFile findSelection(ISelection selection)
  25 + {
  26 + if(selection instanceof TreeSelection)
  27 + {
  28 + TreeSelection tSelection = (TreeSelection)selection;
  29 + if(tSelection.getFirstElement() instanceof IFile)
  30 + return (IFile)tSelection.getFirstElement();
  31 + }
  32 + return null;
  33 + }
  34 +}
fr.femtost.disc.eclipse.sysml2vhdlams.acceleo/tasks/sysml2vhdlamsfile.xml View file @ bc78195
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <project default="sysml2vhdlamsfile" name="fr.femtost.disc.eclipse.sysml2vhdlams.acceleo">
3   - <property name="ECLIPSE_HOME" value="../../../Windows/eclipse_Indigo_SR2"/>
4   - <property name="ECLIPSE_WORKSPACE" value="../.."/>
  3 + <property name="ECLIPSE_HOME" value="../../../../../../Windows/eclipse_Indigo_SR2"/>
  4 + <property name="ECLIPSE_WORKSPACE" value="../../../../../../workspaceSysML2VHDLAMS"/>
5 5  
6 6 <!-- The classpath with only the dependencies used by the project -->
7 7 <path id="fr.femtost.disc.eclipse.sysml2vhdlams.acceleo.libraryclasspath">
fr.femtost.disc.eclipse.sysml2vhdlams.ui/src/fr/femtost/disc/eclipse/sysml2vhdlams/ui/actions/ExportAction.java View file @ bc78195
... ... @@ -9,9 +9,10 @@
9 9 import org.eclipse.ui.IObjectActionDelegate;
10 10 import org.eclipse.ui.IWorkbenchPart;
11 11  
12   -import fr.femtost.disc.eclipse.sysml2vhdlams.ui.jobs.DisplayUtil;
  12 +import fr.femtost.disc.eclipse.sysml2problem.ui.utils.DisplayUtil;
  13 +import fr.femtost.disc.eclipse.sysml2problem.ui.utils.SelectionUtil;
13 14 import fr.femtost.disc.eclipse.sysml2vhdlams.ui.jobs.ExportJob;
14   -import fr.femtost.disc.eclipse.sysml2vhdlams.ui.jobs.SelectionUtil;
  15 +
15 16  
16 17  
17 18 public class ExportAction implements IObjectActionDelegate {
fr.femtost.disc.eclipse.sysml2vhdlams.ui/src/fr/femtost/disc/eclipse/sysml2vhdlams/ui/actions/GenerateAction.java View file @ bc78195
... ... @@ -9,9 +9,9 @@
9 9 import org.eclipse.ui.IObjectActionDelegate;
10 10 import org.eclipse.ui.IWorkbenchPart;
11 11  
12   -import fr.femtost.disc.eclipse.sysml2vhdlams.ui.jobs.DisplayUtil;
  12 +import fr.femtost.disc.eclipse.sysml2problem.ui.utils.DisplayUtil;
  13 +import fr.femtost.disc.eclipse.sysml2problem.ui.utils.SelectionUtil;
13 14 import fr.femtost.disc.eclipse.sysml2vhdlams.ui.jobs.GenerateJob;
14   -import fr.femtost.disc.eclipse.sysml2vhdlams.ui.jobs.SelectionUtil;
15 15  
16 16 public class GenerateAction implements IObjectActionDelegate {
17 17  
fr.femtost.disc.eclipse.sysml2vhdlams.ui/src/fr/femtost/disc/eclipse/sysml2vhdlams/ui/jobs/ExportJob.java View file @ bc78195
... ... @@ -16,6 +16,7 @@
16 16 import org.eclipse.m2m.atl.core.ATLCoreException;
17 17  
18 18 import fr.femtost.disc.eclipse.sysml2problem.ui.jobs.CheckJob;
  19 +import fr.femtost.disc.eclipse.sysml2problem.ui.utils.DisplayUtil;
19 20 import fr.femtost.disc.eclipse.sysml2vhdlams.atl.transformation.Sysml2vhdlams;
20 21  
21 22 public class ExportJob extends Job {
fr.femtost.disc.eclipse.sysml2vhdlams.ui/src/fr/femtost/disc/eclipse/sysml2vhdlams/ui/jobs/GenerateJob.java View file @ bc78195
... ... @@ -20,6 +20,7 @@
20 20 import org.eclipse.m2m.atl.core.ATLCoreException;
21 21  
22 22 import fr.femtost.disc.eclipse.sysml2problem.ui.jobs.CheckJob;
  23 +import fr.femtost.disc.eclipse.sysml2problem.ui.utils.DisplayUtil;
23 24 import fr.femtost.disc.eclipse.sysml2vhdlams.acceleo.common.GenerateAll;
24 25 import fr.femtost.disc.eclipse.sysml2vhdlams.atl.transformation.Sysml2vhdlams;
25 26  
fr.femtost.disc.sysml2vhdlams.updatesite/artifacts.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/content.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/features/fr.femtost.disc.sysml2vhdlams.feature_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/plugins/fr.femtost.disc.eclipse.problemmetamodel_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/plugins/fr.femtost.disc.eclipse.sysml2problem.atl_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/plugins/fr.femtost.disc.eclipse.sysml2problem.ui_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/plugins/fr.femtost.disc.eclipse.sysml2vhdlams.acceleo_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/plugins/fr.femtost.disc.eclipse.sysml2vhdlams.atl_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/plugins/fr.femtost.disc.eclipse.sysml2vhdlams.ui_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/plugins/fr.femtost.disc.eclipse.vhdlamslibrary.ui_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/plugins/fr.femtost.disc.eclipse.vhdlamslibrary_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/plugins/fr.femtost.disc.eclipse.vhdlamsmetamodel.edit_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/plugins/fr.femtost.disc.eclipse.vhdlamsmetamodel.editor_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/plugins/fr.femtost.disc.eclipse.vhdlamsmetamodel_1.0.0.201404231658.jar View file @ bc78195

No preview for this file type

fr.femtost.disc.sysml2vhdlams.updatesite/site.xml View file @ bc78195
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <site>
3   - <feature url="features/fr.femtost.disc.sysml2vhdlams.feature_1.0.0.201404231614.jar" id="fr.femtost.disc.sysml2vhdlams.feature" version="1.0.0.201404231614">
  3 + <feature url="features/fr.femtost.disc.sysml2vhdlams.feature_1.0.0.201404231658.jar" id="fr.femtost.disc.sysml2vhdlams.feature" version="1.0.0.201404231658">
4 4 <category name="SysML2Vhdlams"/>
5 5 </feature>
6 6 <category-def name="SysML2Vhdlams" label="SysML2Vhdlams"/>