private static final FirstPanel init() {\r
try {\r
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r
- //UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());\r
- //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");\r
- //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");\r
- //UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");\r
- //UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");\r
} catch (Exception e) {\r
System.out.println(e.getMessage());\r
}\r
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r
\r
FirstPanel fp = new FirstPanel();\r
- //fp.setLayout(new GridBagLayout());\r
- //fp.setLayout(new BoxLayout(fp, BoxLayout.Y_AXIS));\r
fp.setOpaque(true);\r
frame.setContentPane(fp);\r
\r
}\r
return temp;\r
}\r
- /*\r
- public static String registerFuncD(Matcher mtr, ModuleInfo mi, Database db) {\r
- String temp = null;\r
-\r
- temp = mtr.group(1); // both changed and not changed funcd are registered , for finding all the non-local function calls\r
- if (!reservedwords.contains(temp)) {\r
- mi.hashfuncd.add(temp);\r
- }\r
- return temp;\r
- }\r
- */\r
}\r
\r
MigrationTool.ui.println("Errors Left : " + MigrationTool.db.error);\r
MigrationTool.ui.println("Complete!");\r
- //MigrationTool.ui.println("Your R9 module was placed here: " + mi.modulepath + File.separator + "result");\r
- //MigrationTool.ui.println("Your logfile was placed here: " + mi.modulepath);\r
}\r
\r
private static final void show(Set<String> hash, String show) {\r
}\r
}\r
\r
- //CommentOutNonLocalHFile();\r
Common.toDoAll(mi.temppath, this, Common.FILE);\r
\r
parsePreProcessedSourceCode();\r
}\r
\r
private final void parsePreProcessedSourceCode() throws Exception {\r
- //Cl cl = new Cl(modulepath);\r
- //cl.execute("Fat.c");\r
- //cl.generateAll(preprocessedccodes);\r
- //\r
- //System.out.println("Note!!!! The CL is not implemented now , pls do it manually!!! RUN :");\r
- //System.out.println("cl " + modulepath + "\\temp\\*.c" + " -P");\r
- //String[] list = new File(modulepath + File.separator + "temp").list(); // without CL , add\r
BufferedReader rd = null;\r
String ifile = null;\r
String line = null;\r
return true;\r
}\r
\r
- /*\r
- private final boolean installProtocols () {\r
- if (mapprotocols.isEmpty()) {\r
- return false;\r
- }\r
- Set<String> setprotocols = mapprotocols.keySet();\r
- ProtocolsDocument.Protocols.Protocol protocol;\r
- Iterator<String> it = setprotocols.iterator();\r
- while (it.hasNext()) {\r
- protocol = protocols.addNewProtocol();\r
- protocol.setProtocolCName(it.next());\r
- protocol.setUsage(mapprotocols.get(protocol.getProtocolCName()));\r
- }\r
- return true;\r
- }\r
- \r
- public final boolean addProtocols (String protocol, UsageTypes.Enum usage) {\r
- if (mapprotocols.containsKey(protocol)) {\r
- return false;\r
- } else {\r
- mapprotocols.put(protocol, usage);\r
- return true;\r
- }\r
- }\r
- */\r
public final boolean addProtocol (String proname, UsageTypes.Enum usage) {\r
if (protocols == null) {\r
protocols = msa.addNewProtocols();\r
return true;\r
}\r
\r
- /*\r
- private final boolean installHashFilename () {\r
- if (mapfilenames.isEmpty()) {\r
- return false;\r
- }\r
- Set<String> setfilename = mapfilenames.keySet();\r
- FilenameDocument.Filename filename;\r
- List<Enum> arch = new ArrayList<Enum>();\r
- Iterator<String> it = setfilename.iterator();\r
- while (it.hasNext()) {\r
- filename = sourcefiles.addNewFilename();\r
- filename.setStringValue(it.next());\r
- arch.add(mapfilenames.get(filename.getStringValue()));\r
- filename.setSupArchList(arch);\r
- }\r
- return true;\r
- }\r
- \r
- public final boolean addSourceFile (String filename, Enum arch) { // dummy & null how to imply?\r
- if (mapfilenames.containsKey(filename)) {\r
- return false;\r
- } else {\r
- mapfilenames.put(filename, arch);\r
- return true;\r
- }\r
- }\r
- */\r
public final boolean addSourceFile (String name, Enum en) {\r
Iterator<FilenameDocument.Filename> fileit = sourcefiles.getFilenameList().iterator();\r
while (fileit.hasNext()) {\r
*/\r
private static final long serialVersionUID = 3169905938472150649L;\r
\r
- private \r
-/*\r
- MsaTreeEditor(ModuleInfo m, UI u, ModuleSurfaceAreaDocument md) {\r
- mi = m;\r
- ui = u;\r
- msadoc = md;\r
- \r
- //rootNode = msadoc.getDomNode();\r
- rootNode = new DefaultMutableTreeNode("Root Node");\r
- treeModel = new DefaultTreeModel(rootNode);\r
-\r
- tree = new JTree(treeModel);\r
- tree.setEditable(true);\r
- tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);\r
- tree.setShowsRootHandles(false);\r
- tree.addMouseListener(mouseadapter);\r
-\r
- JScrollPane scrollPane = new JScrollPane(tree);\r
- add(scrollPane);\r
- \r
- popupmenu = new JPopupMenu();\r
- menuitemadd = new JMenuItem("addNode");\r
- menuitemdel = new JMenuItem("deleteNode");\r
- popupmenu.add(menuitemadd);\r
- popupmenu.add(menuitemdel);\r
- menuitemadd.addActionListener(actionListener);\r
- menuitemdel.addActionListener(actionListener);\r
- \r
- addNode(rootNode, "1st");\r
- addNode(rootNode, "2nd");\r
- }\r
-*/\r
MsaTreeEditor() throws Exception {\r
rootNode = new DefaultMutableTreeNode("Root Node");\r
treeModel = new DefaultTreeModel(rootNode);\r