Source Code Cross Referenced for ISaveablesSource.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » 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 Eclipse » ui workbench » org.eclipse.ui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*******************************************************************************
002:         * Copyright (c) 2006 IBM Corporation and others.
003:         * All rights reserved. This program and the accompanying materials
004:         * are made available under the terms of the Eclipse Public License v1.0
005:         * which accompanies this distribution, and is available at
006:         * http://www.eclipse.org/legal/epl-v10.html
007:         *
008:         * Contributors:
009:         *     IBM Corporation - initial API and implementation
010:         ******************************************************************************/package org.eclipse.ui;
011:
012:        import org.eclipse.ui.part.EditorPart;
013:
014:        /**
015:         * Represents a source of Saveable objects (units of saveability). Workbench
016:         * parts that show more than one unit of saveability, or whose units of
017:         * saveability change over time, should implement this interface in order to
018:         * provide better integration with workbench facilities like the Save command,
019:         * prompts to save on part close or shutdown, etc.
020:         * <p>
021:         * IMPORTANT: As of 3.2, implementers of <code>ISaveablesSource</code> must
022:         * satisfy the following conditions:
023:         * <ul>
024:         * <li>If ISaveablesSource is implemented by an IWorkbenchPart:
025:         * <ul>
026:         * <li>the part must implement <code>ISaveablePart</code></li>
027:         * <li>if any of its Saveable objects are dirty, the part must return
028:         * <code>true</code> from {@link ISaveablePart#isDirty()}</li>
029:         * <li>the part must return <code>true</code> from
030:         * {@link ISaveablePart#isSaveOnCloseNeeded()} if it is dirty (the default
031:         * behaviour implemented by {@link EditorPart})</li>
032:         * <li>the part must not implement {@link ISaveablePart2}</li>
033:         * </ul>
034:         * </li>
035:         * <li>If ISaveablesSource is implemented by a non-part (possible as of 3.2.1 and 3.3):
036:         * <ul>
037:         * <li>the Workbench's {@link ISaveablesLifecycleListener} (obtained from the
038:         * Workbench by calling
039:         * <code>workbench.getService(ISaveablesLifecycleListener.class)</code>) must
040:         * be notified of any change to the result of {@link #getSaveables()} </li>
041:         * <li>getActiveSaveables() should be implemented to return an empty array
042:         * </li>
043:         * </ul>
044:         * </ul>
045:         * If any of these conditions are not met, it is undefined whether the Workbench
046:         * will prompt to save dirty Saveables when closing parts or the Workbench.
047:         * </p>
048:         * <p>
049:         * These conditions may be relaxed in future releases.
050:         * </p>
051:         * 
052:         * @since 3.2
053:         */
054:        public interface ISaveablesSource {
055:
056:            /**
057:             * Returns the saveables presented by the workbench part. If the return
058:             * value of this method changes during the lifetime of
059:             * this part (i.e. after initialization and control creation but before disposal)
060:             * the part must notify an implicit listener using
061:             * {@link ISaveablesLifecycleListener#handleLifecycleEvent(SaveablesLifecycleEvent)}.
062:             * <p>
063:             * Additions of saveables to the list of saveables of this part are
064:             * announced using an event of type
065:             * {@link SaveablesLifecycleEvent#POST_OPEN}. Removals are announced in a
066:             * two-stage process, first using an event of type
067:             * {@link SaveablesLifecycleEvent#PRE_CLOSE} followed by an event of type
068:             * {@link SaveablesLifecycleEvent#POST_CLOSE}. Since firing the
069:             * <code>PRE_CLOSE</code> event may trigger prompts to save dirty
070:             * saveables, the cancellation status of the event must be checked by the
071:             * part after the notification. When removing only non-dirty saveables,
072:             * <code>POST_CLOSE</code> notification is sufficient.
073:             * </p>
074:             * <p>
075:             * The listener is obtained from the part site by calling
076:             * <code>partSite.getService(ISaveablesLifecycleListener.class)</code>.
077:             * </p>
078:             * <p>
079:             * The part must not notify from its initialization methods (e.g. <code>init</code>
080:             * or <code>createPartControl</code>), or from its dispose method. Parts that
081:             * implement {@link IReusableEditor} must notify when their input is changed
082:             * through {@link IReusableEditor#setInput(IEditorInput)}.
083:             * </p>
084:             * 
085:             * @return the saveables presented by the workbench part
086:             * 
087:             * @see ISaveablesLifecycleListener
088:             */
089:            Saveable[] getSaveables();
090:
091:            /**
092:             * Returns the saveables currently active in the workbench part.
093:             * <p>
094:             * Certain workbench actions, such as Save, target only the active saveables
095:             * in the active part. For example, the active saveables could be determined
096:             * based on the current selection in the part.
097:             * </p>
098:             * 
099:             * @return the saveables currently active in the workbench part
100:             */
101:            Saveable[] getActiveSaveables();
102:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.