Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
VioletPlugin.ExportImportFilters project
- Loading branch information
tms08012
committed
Jun 7, 2012
1 parent
1fb0ed0
commit 04f2071
Showing
5 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
VioletPluginExportImport/VioletPlugin.ExportImportFilters/.classpath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry excluding="src/" kind="src" path=""/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> | ||
<classpathentry kind="lib" path="/VioletProduct.eclipse-plugin/trunk/lib/com.horstmann.violet-2.0.0-SNAPSHOT.jar"/> | ||
<classpathentry kind="lib" path="C:/Users/tms08012/Documents/2012FallJars/com.horstmann.violet-0.21.1.jar"/> | ||
<classpathentry kind="lib" path="C:/Users/tms08012/Documents/2012FallJars/com.horstmann.violet.plugin.classdiagram-1.0-20110219.222952-4.jar"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
17 changes: 17 additions & 0 deletions
17
VioletPluginExportImport/VioletPlugin.ExportImportFilters/.project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>VioletPlugin.ExportImportFilters</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
11 changes: 11 additions & 0 deletions
11
...tPluginExportImport/VioletPlugin.ExportImportFilters/.settings/org.eclipse.jdt.core.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.7 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.source=1.7 |
1 change: 1 addition & 0 deletions
1
...Plugin.ExportImportFilters/META-INF/services/com.horstmann.violet.framework.plugin.Plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fr.free.alexdp.violet.importexportfilters.ImportExportFiltersPlugin |
66 changes: 66 additions & 0 deletions
66
...mportFilters/src/fr/free/alexdp/violet/importexportfilters/ImportExportFiltersPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Projet : | ||
* Package : fr.free.alexdp.violet.importexportfilters | ||
* Auteur : a.depellegrin | ||
* Cr�� le : 30 janv. 2008 | ||
*/ | ||
package fr.free.alexdp.violet.importexportfilters; | ||
|
||
import java.io.OutputStream; | ||
|
||
//tms import com.horstmann.violet.framework.display.clipboard.DiagramPanel; | ||
//tms import com.horstmann.violet.framework.display.clipboard.DialogFactory; | ||
//tmsimport com.horstmann.violet.framework.display.clipboard.IDiagramPanel; | ||
import com.horstmann.violet.framework.file.ExtensionFilter; | ||
import com.horstmann.violet.framework.file.FileChooserService; | ||
import com.horstmann.violet.framework.file.FileSaverHandler; | ||
import com.horstmann.violet.framework.file.FileService; | ||
import com.horstmann.violet.framework.plugin.IDiagramPlugin;//tms, I added I in front of Diagram | ||
import com.horstmann.violet.product.diagram.abstracts.IGraph;//tms I added I in front of Graph | ||
//tms import com.horstmann.violet.product.diagram.abstracts.GraphService; | ||
|
||
public class ImportExportFiltersPlugin{//tms implements DiagramPlugin { | ||
|
||
public void start() { | ||
} | ||
|
||
// public IDiagramPanel diagramPanel; | ||
|
||
/** | ||
* Exports given diagram to xmi format. | ||
* | ||
* @param diagramPanel | ||
* @param fileChooserService | ||
*/ | ||
/* public void exportToXMI(DiagramPanel diagramPanel, FileChooserService fileChooserService) | ||
{ | ||
if (diagramPanel == null || diagramPanel.view.getGraphPanel(diagramPanel) == null || diagramPanel.view.getGraphPanel(diagramPanel).getGraph() == null) return; | ||
Graph graph = diagramPanel.view.getGraphPanel(diagramPanel).getGraph(); | ||
if (graph instanceof ClassDiagramGraph) | ||
{ | ||
DialogFactory.getInstance().showErrorDialog(this.menuResourceBundle.getString("dialog.export_to_xmi.error")); | ||
return; | ||
} | ||
try | ||
{ | ||
String xmiExtension = FileService.getXMIFileExtension(); | ||
ExtensionFilter extensionFilter = FileService.getExtensionFilter(diagramPanel.view.getGraphPanel(diagramPanel).getGraph()); | ||
ExtensionFilter exportFilter = FileService.getXMIExtensionFilter(); | ||
FileSaverHandler save = fileChooserService.save(null, diagramPanel.getFilePath(), exportFilter, extensionFilter | ||
.getExtensions()[0], xmiExtension); | ||
OutputStream out = save.getOutputStream(); | ||
if (out != null) | ||
{ | ||
GraphService.exportToXMI(graph, out); | ||
out.close(); | ||
} | ||
} | ||
catch (Exception e) | ||
{ | ||
// Well, we tried... | ||
e.printStackTrace(); | ||
} | ||
}*/ | ||
|
||
} |