1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
/*******************************************************************************
* <copyright>
*
* Copyright (c) 2005, 2010 SAP AG.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Stefan Dimov - initial API, implementation and documentation
*
* </copyright>
*
*******************************************************************************/
package org.eclipse.jpt.jpadiagrameditor.ui.internal.util;
import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.graphiti.mm.pictograms.ConnectionDecorator;
import org.eclipse.graphiti.mm.pictograms.FreeFormConnection;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jpt.jpa.core.JpaProject;
import org.eclipse.jpt.jpa.core.context.java.JavaPersistentType;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.provider.IJPAEditorFeatureProvider;
import org.eclipse.jpt.jpadiagrameditor.ui.internal.provider.IJPAEditorImageCreator.RelEndDir;
import org.eclipse.swt.graphics.Point;
import org.eclipse.ui.IWorkbenchSite;
public interface IJPAEditorUtil {
public List<Point> createBendPointList(FreeFormConnection c, int cnt, int connectionsNum, boolean selfRelation);
public List<Point> createBendPointList(FreeFormConnection c, boolean selfRelation);
public int calcConnectionLength(FreeFormConnection c);
public RelEndDir getConnectionStartDir(FreeFormConnection c);
public RelEndDir getConnectionEndDir(FreeFormConnection c);
public JavaPersistentType getJPType(ICompilationUnit cu);
public void organizeImports(ICompilationUnit cu, IWorkbenchSite ws);
public ICompilationUnit getCompilationUnit(JavaPersistentType jpt);
public void formatCode(ICompilationUnit cu, IWorkbenchSite ws);
public String generateUniqueEntityName(JpaProject jpaProject,
String pack,
IJPAEditorFeatureProvider fp);
public String generateUniqueMappedSuperclassName(JpaProject jpaProject,
String pack, IJPAEditorFeatureProvider fp);
public IFile createEntityInProject(IProject project,
String entityName,
IPreferenceStore jpaPreferenceStore,
boolean isMappedSuperClassChild,
String mappedSuperclassName,
String mappedSuperclassPackage,
boolean hasPrimaryKey) throws Exception;
public IFile createEntityFromMappedSuperclassInProject(IProject project,
String mappedSuperclassName, IPreferenceStore jpaPreferenceStore) throws Exception;
public boolean isCardinalityDecorator(ConnectionDecorator cd);
public void discardWorkingCopyOnce(ICompilationUnit cu);
}
|