Source Code Cross Referenced for Main.java in  » IDE » tIDE » tide » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE » tIDE » tide 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package tide;
002:
003:        import javax.swing.UIManager;
004:        import javax.swing.ToolTipManager;
005:        import java.util.prefs.Preferences;
006:        import java.util.*;
007:        import tide.update.UpdaterUtils;
008:        import java.awt.EventQueue;
009:        import javax.swing.RepaintManager;
010:        import snow.datatransfer.ClipboardUtils;
011:
012:        /*
013:         * tIDE -- a small java IDE.
014:         *
015:         * Copyright (c) 2005-2008 Stephan Heiss (stephan.heiss@gmail.com)
016:         *
017:         * This program is free software; you can redistribute it and/or modify it
018:         * under the terms of the GNU General Public License as published by the Free
019:         * Software Foundation; either version 2 of the License, or (at your option)
020:         * any later version.
021:         *
022:         * This program is distributed in the hope that it will be useful, but WITHOUT
023:         * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
024:         * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
025:         * more details.
026:         *
027:         * You should have received a copy of the GNU General Public License along
028:         * with this program; if not, write to the Free Software Foundation, Inc.,
029:         * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
030:         *
031:         */
032:        import java.io.*;
033:
034:        import tide.editor.MainEditorFrame;
035:        import snow.lookandfeel.ThemesManager;
036:
037:        /** Main launcher class for tIDE. Run this to run tIDE. Scans some args.
038:         *   Last arg maybe a project name.
039:         */
040:        @net.jcip.annotations.ThreadSafe
041:        public final class Main // need not to be a public type to be started !!   (strange !)
042:        {
043:
044:            private Main() {
045:            }
046:
047:            @SuppressWarnings("unchecked")
048:            public static void main(final String[] args) {
049:
050:                Locale.setDefault(Locale.ENGLISH);
051:                System.out.println(MainEditorFrame._VERSION);
052:
053:                // for Mike Karas:   so he can pass com.sun.java.swing.plaf.windows.WindowsLookAndFeel
054:                if (!hasOption_EqualsIgnoreCase(args, "-noTheme")) {
055:                    ThemesManager.getInstance().installSelectedTheme();
056:                }
057:
058:                // only works if in the classpath !
059:                if (hasOption_EqualsIgnoreCase(args, "-jgoodiesLook")) {
060:                    try {
061:                        UIManager
062:                                .setLookAndFeel("com.jgoodies.looks.windows.WindowsLookAndFeel");
063:                    } catch (Exception e) {
064:                    }
065:                }
066:
067:                ClipboardUtils.getInstance();
068:
069:                ToolTipManager.sharedInstance().setDismissDelay(30000); // idea for sun: make the tips longer visible if they are long !
070:
071:                final List<String> argsForMEF = new ArrayList<String>();
072:
073:                // args
074:                if (args != null) {
075:                    argsForMEF.addAll(Arrays.asList(args));
076:
077:                    for (final String ai : args) {
078:                        if (ai.trim().equalsIgnoreCase("-debug")) {
079:                            MainEditorFrame.debug = true;
080:                            RepaintManager
081:                                    .setCurrentManager(new debug.CheckThreadViolationRepaintManager());
082:                        } else if (ai.trim().equalsIgnoreCase(
083:                                "-enableExperimental")) {
084:                            MainEditorFrame.enableExperimental = true;
085:                        } else if (ai.trim().equalsIgnoreCase("-help")) {
086:                            System.out
087:                                    .println("Available arguments are "
088:                                            + "{ -enableExperimental, -debug, -logtab, -help, -lowMem, -openLastProj, -compileAll, -noSearchTab, -compactUI }"
089:                                            + "\nAs last arg, a project file or sourcefile may be passed.");
090:                        } else if (ai.trim().equalsIgnoreCase("-logtab")) {
091:                            MainEditorFrame.redirectConsoleInTab = true;
092:                        } else if (ai.trim().equalsIgnoreCase("-noSearchTab")) {
093:                            MainEditorFrame.noSearchTab = true;
094:                        } else if (ai.trim().equalsIgnoreCase("-compactUI")) {
095:                            MainEditorFrame.compactUI = true;
096:                        } else if (ai.trim().equalsIgnoreCase("-lowmem")) {
097:                            // don't load libs...
098:                            // don't cache syntax trees
099:                            MainEditorFrame.lowMemoryMode = true;
100:                        } else if (ai.trim().equalsIgnoreCase("-compileAll")) {
101:                            MainEditorFrame.compileAllAtStartup = true;
102:                        } else if (ai.trim().equalsIgnoreCase("-openLastProj")) {
103:                            // opens the last opened project, without dialog.
104:                            String lp = Preferences.userRoot().get(
105:                                    "tide_last_opened_proj", null);
106:                            if (lp != null) {
107:                                File lastP = new File(lp);
108:                                if (lastP.exists()) {
109:                                    argsForMEF.add(lp);
110:                                }
111:                            }
112:                        }
113:                    }
114:                }
115:
116:                // This main call solve almost all bad EDT calls
117:                // not critical, because these components are not still realized (visible), but it is better
118:                // to run them in the EDT. (no invokeandwait should be within this call...)
119:                // the CheckThreadViolationRepaintManager that is running when -debug is set will
120:                // show us all the real bad calls during the runtime.
121:                EventQueue.invokeLater(new Runnable() {
122:                    public void run() {
123:                        MainEditorFrame.mainmet(argsForMEF
124:                                .toArray(new String[argsForMEF.size()]));
125:                    }
126:                });
127:
128:                UpdaterUtils.deleteReplacer();
129:            }
130:
131:            private static boolean hasOption_EqualsIgnoreCase(String[] args,
132:                    String opt) {
133:                if (args == null)
134:                    return false;
135:
136:                for (final String ai : args) {
137:                    if (ai.trim().equalsIgnoreCase(opt)) {
138:                        return true;
139:                    }
140:                }
141:
142:                return false;
143:            }
144:
145:            /*Changes (part):
146:               1.46: minor bugfixes (completion of methods after fields)
147:                     autostart after update.
148:               1.48: corrected a major bug in dependencies detection (was ignoring sst)
149:                   moved Main
150:                   invalidate dependencies at startup (once per project)
151:                   invalidate compiled state if no classes seen. (as on ramdisks)
152:                   allow selecting custom project root (useful for ramdisk)
153:                   allow reset of working time
154:                   static launcher (beta)
155:               1.49
156:                   ameliorated tabs visibilities
157:                   ameliorated recent search
158:                   added Ctrl+Shift+M to see messages of current source
159:                   fixed a bug in the updater when called from startup.
160:               1.51
161:                   improved UI, moved the toolbar in the menubar
162:                   resources explorer (Ctrl+shift+R) with code insert
163:                   improved class params in completion (generics)
164:                   started to simplify the parser tree (less depth, better visibility with colors)
165:                   improved tide's eye utility
166:                   -compactUI start flag. tIDE should be nice on the Asus EEE PC !
167:
168:
169:             */
170:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.