Skip to content

Commit 85fb1ac

Browse files
author
zhourenjian
committed
Early support of JFace
1 parent 7866bcc commit 85fb1ac

File tree

21 files changed

+314
-297
lines changed

21 files changed

+314
-297
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Java2Script Configuration
2-
#Sat Jan 20 01:17:17 CST 2007
2+
#Tue Feb 10 23:46:52 CST 2009
33
j2s.resources.list=../../plugins/net.sf.j2s.lib_1.0.0/j2slib/java.runtime.j2x,/net.sf.j2s.java.org.eclipse.core.runtime/.j2s,bin/org/eclipse/core/internal/commands/util/Util.js,bin/org/eclipse/core/internal/commands/util/Assert.js,bin/org/eclipse/core/internal/commands/operations/GlobalUndoContext.js,bin/org/eclipse/core/commands/operations/UndoContext.js,bin/org/eclipse/core/commands/operations/TriggeredOperations.js,bin/org/eclipse/core/commands/operations/OperationStatus.js,bin/org/eclipse/core/commands/operations/OperationHistoryFactory.js,bin/org/eclipse/core/commands/operations/OperationHistoryEvent.js,bin/org/eclipse/core/commands/operations/ObjectUndoContext.js,bin/org/eclipse/core/commands/operations/LinearUndoViolationDetector.js,bin/org/eclipse/core/commands/operations/LinearUndoEnforcer.js,bin/org/eclipse/core/commands/operations/IUndoableOperation.js,bin/org/eclipse/core/commands/operations/IUndoContext.js,bin/org/eclipse/core/commands/operations/IOperationHistoryListener.js,bin/org/eclipse/core/commands/operations/IOperationHistory.js,bin/org/eclipse/core/commands/operations/IOperationApprover.js,bin/org/eclipse/core/commands/operations/ICompositeOperation.js,bin/org/eclipse/core/commands/operations/IAdvancedUndoableOperation.js,bin/org/eclipse/core/commands/operations/DefaultOperationHistory.js,bin/org/eclipse/core/commands/operations/AbstractOperation.js,bin/org/eclipse/core/commands/contexts/IContextManagerListener.js,bin/org/eclipse/core/commands/contexts/IContextListener.js,bin/org/eclipse/core/commands/contexts/ContextManagerEvent.js,bin/org/eclipse/core/commands/contexts/ContextManager.js,bin/org/eclipse/core/commands/contexts/ContextEvent.js,bin/org/eclipse/core/commands/contexts/Context.js,bin/org/eclipse/core/commands/common/NotDefinedException.js,bin/org/eclipse/core/commands/common/NamedHandleObject.js,bin/org/eclipse/core/commands/common/HandleObject.js,bin/org/eclipse/core/commands/common/CommandException.js,bin/org/eclipse/core/commands/common/AbstractNamedHandleEvent.js,bin/org/eclipse/core/commands/common/AbstractBitSetEvent.js,bin/org/eclipse/core/commands/ParameterizedCommand.js,bin/org/eclipse/core/commands/Parameterization.js,bin/org/eclipse/core/commands/ParameterValuesException.js,bin/org/eclipse/core/commands/NotHandledException.js,bin/org/eclipse/core/commands/IParameterValues.js,bin/org/eclipse/core/commands/IParameter.js,bin/org/eclipse/core/commands/IHandlerListener.js,bin/org/eclipse/core/commands/IHandlerAttributes.js,bin/org/eclipse/core/commands/IHandler.js,bin/org/eclipse/core/commands/IExecutionListener.js,bin/org/eclipse/core/commands/ICommandManagerListener.js,bin/org/eclipse/core/commands/ICommandListener.js,bin/org/eclipse/core/commands/ICategoryListener.js,bin/org/eclipse/core/commands/HandlerEvent.js,bin/org/eclipse/core/commands/ExecutionException.js,bin/org/eclipse/core/commands/ExecutionEvent.js,bin/org/eclipse/core/commands/CommandManagerEvent.js,bin/org/eclipse/core/commands/CommandManager.js,bin/org/eclipse/core/commands/CommandEvent.js,bin/org/eclipse/core/commands/Command.js,bin/org/eclipse/core/commands/CategoryEvent.js,bin/org/eclipse/core/commands/Category.js,bin/org/eclipse/core/commands/AbstractHandler.js
4-
j2s.output.path=bin
54
j2s.abandoned.resources.list=
5+
j2s.output.path=bin
66
j2s.compiler.status=enable

sources/net.sf.j2s.java.org.eclipse.core.commands/.project

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
<projects>
66
</projects>
77
<buildSpec>
8-
<buildCommand>
9-
<name>org.eclipse.jdt.core.javabuilder</name>
10-
<arguments>
11-
</arguments>
12-
</buildCommand>
138
<buildCommand>
149
<name>net.sf.j2s.core.java2scriptbuilder</name>
1510
<arguments>

sources/net.sf.j2s.java.org.eclipse.core.runtime/.j2s

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

sources/net.sf.j2s.java.org.eclipse.core.runtime/.project

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
<projects>
66
</projects>
77
<buildSpec>
8-
<buildCommand>
9-
<name>org.eclipse.jdt.core.javabuilder</name>
10-
<arguments>
11-
</arguments>
12-
</buildCommand>
138
<buildCommand>
149
<name>net.sf.j2s.core.java2scriptbuilder</name>
1510
<arguments>

sources/net.sf.j2s.java.org.eclipse.core.runtime/src/org/eclipse/core/runtime/Platform.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
* <li>the platform log</li>
3333
* <li>the authorization info management</li>
3434
* </ul>
35+
*
36+
* @j2sIgnoreImport org.eclipse.core.internal.runtime.InternalPlatform,org.eclipse.core.internal.runtime.FindSupport,org.eclipse.core.internal.runtime.CompatibilityHelper
3537
*/
3638
public final class Platform {
3739

sources/net.sf.j2s.java.org.eclipse.core.runtime/src/org/eclipse/core/runtime/Status.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class Status implements IStatus {
2525
*
2626
* @since 3.0
2727
*/
28-
public static final IStatus OK_STATUS = new Status(OK, Platform.PI_RUNTIME, OK, Messages.ok, null);
28+
public static final IStatus OK_STATUS = new Status(OK, Platform.PI_RUNTIME, OK, "OK", null);
2929
/**
3030
* A standard CANCEL status with no message.
3131
*

sources/net.sf.j2s.java.org.eclipse.jface/.j2s

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

sources/net.sf.j2s.java.org.eclipse.jface/.project

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
<projects>
66
</projects>
77
<buildSpec>
8-
<buildCommand>
9-
<name>org.eclipse.jdt.core.javabuilder</name>
10-
<arguments>
11-
</arguments>
12-
</buildCommand>
138
<buildCommand>
149
<name>net.sf.j2s.core.java2scriptbuilder</name>
1510
<arguments>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package.prefix=org.eclipse.jface
2+
package.name=jface
3+
package.description=Eclipse JFace 3.1 library
4+
package.id=jface
5+

sources/net.sf.j2s.java.org.eclipse.jface/src/org/eclipse/jface/action/ExternalActionManager.java

Lines changed: 121 additions & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,127 @@
6363
*/
6464
public final class ExternalActionManager {
6565

66+
/**
67+
* Defines a callback mechanism for developer who wish to further control
68+
* the visibility of legacy action-based contribution items.
69+
*
70+
* @since 3.1
71+
*/
72+
public static interface IActiveChecker {
73+
/**
74+
* Checks whether the command with the given identifier should be
75+
* considered active. This can be used in systems using some kind of
76+
* user interface filtering (e.g., activities in the Eclipse workbench).
77+
*
78+
* @param commandId
79+
* The identifier for the command; must not be
80+
* <code>null</code>
81+
* @return <code>true</code> if the command is active;
82+
* <code>false</code> otherwise.
83+
*/
84+
public boolean isActive(String commandId);
85+
}
86+
87+
/**
88+
* A callback mechanism for some external tool to communicate extra
89+
* information to actions and action contribution items.
90+
*
91+
* @since 3.0
92+
*/
93+
public static interface ICallback {
94+
95+
/**
96+
* <p>
97+
* Adds a listener to the object referenced by <code>identifier</code>.
98+
* This listener will be notified if a property of the item is to be
99+
* changed. This identifier is specific to mechanism being used. In the
100+
* case of the Eclipse workbench, this is the command identifier.
101+
* </p>
102+
* <p>
103+
* A single instance of the listener may only ever be associated with
104+
* one identifier. Attempts to add the listener twice (without a removal
105+
* inbetween) has undefined behaviour.
106+
* </p>
107+
*
108+
* @param identifier
109+
* The identifier of the item to which the listener should be
110+
* attached; must not be <code>null</code>.
111+
* @param listener
112+
* The listener to be added; must not be <code>null</code>.
113+
*/
114+
public void addPropertyChangeListener(String identifier,
115+
IPropertyChangeListener listener);
116+
117+
/**
118+
* An accessor for the accelerator associated with the item indicated by
119+
* the identifier. This identifier is specific to mechanism being used.
120+
* In the case of the Eclipse workbench, this is the command identifier.
121+
*
122+
* @param identifier
123+
* The identifier of the item from which the accelerator
124+
* should be obtained ; must not be <code>null</code>.
125+
* @return An integer representation of the accelerator. This is the
126+
* same accelerator format used by SWT.
127+
*/
128+
public Integer getAccelerator(String identifier);
129+
130+
/**
131+
* An accessor for the accelerator text associated with the item
132+
* indicated by the identifier. This identifier is specific to mechanism
133+
* being used. In the case of the Eclipse workbench, this is the command
134+
* identifier.
135+
*
136+
* @param identifier
137+
* The identifier of the item from which the accelerator text
138+
* should be obtained ; must not be <code>null</code>.
139+
* @return A string representation of the accelerator. This is the
140+
* string representation that should be displayed to the user.
141+
*/
142+
public String getAcceleratorText(String identifier);
143+
144+
/**
145+
* Checks to see whether the given accelerator is being used by some
146+
* other mechanism (outside of the menus controlled by JFace). This is
147+
* used to keep JFace from trying to grab accelerators away from someone
148+
* else.
149+
*
150+
* @param accelerator
151+
* The accelerator to check -- in SWT's internal accelerator
152+
* format.
153+
* @return <code>true</code> if the accelerator is already being used
154+
* and shouldn't be used again; <code>false</code> otherwise.
155+
*/
156+
public boolean isAcceleratorInUse(int accelerator);
157+
158+
/**
159+
* Checks whether the item matching this identifier is active. This is
160+
* used to decide whether a contribution item with this identifier
161+
* should be made visible. An inactive item is not visible.
162+
*
163+
* @param identifier
164+
* The identifier of the item from which the active state
165+
* should be retrieved; must not be <code>null</code>.
166+
* @return <code>true</code> if the item is active; <code>false</code>
167+
* otherwise.
168+
*/
169+
public boolean isActive(String identifier);
170+
171+
/**
172+
* Removes a listener from the object referenced by
173+
* <code>identifier</code>. This identifier is specific to mechanism
174+
* being used. In the case of the Eclipse workbench, this is the command
175+
* identifier.
176+
*
177+
* @param identifier
178+
* The identifier of the item to from the listener should be
179+
* removed; must not be <code>null</code>.
180+
* @param listener
181+
* The listener to be removed; must not be <code>null</code>.
182+
*/
183+
public void removePropertyChangeListener(String identifier,
184+
IPropertyChangeListener listener);
185+
}
186+
66187
/**
67188
* A simple implementation of the <code>ICallback</code> mechanism that
68189
* simply takes a <code>BindingManager</code> and a
@@ -344,127 +465,6 @@ public final void removePropertyChangeListener(final String commandId,
344465
}
345466
}
346467

347-
/**
348-
* Defines a callback mechanism for developer who wish to further control
349-
* the visibility of legacy action-based contribution items.
350-
*
351-
* @since 3.1
352-
*/
353-
public static interface IActiveChecker {
354-
/**
355-
* Checks whether the command with the given identifier should be
356-
* considered active. This can be used in systems using some kind of
357-
* user interface filtering (e.g., activities in the Eclipse workbench).
358-
*
359-
* @param commandId
360-
* The identifier for the command; must not be
361-
* <code>null</code>
362-
* @return <code>true</code> if the command is active;
363-
* <code>false</code> otherwise.
364-
*/
365-
public boolean isActive(String commandId);
366-
}
367-
368-
/**
369-
* A callback mechanism for some external tool to communicate extra
370-
* information to actions and action contribution items.
371-
*
372-
* @since 3.0
373-
*/
374-
public static interface ICallback {
375-
376-
/**
377-
* <p>
378-
* Adds a listener to the object referenced by <code>identifier</code>.
379-
* This listener will be notified if a property of the item is to be
380-
* changed. This identifier is specific to mechanism being used. In the
381-
* case of the Eclipse workbench, this is the command identifier.
382-
* </p>
383-
* <p>
384-
* A single instance of the listener may only ever be associated with
385-
* one identifier. Attempts to add the listener twice (without a removal
386-
* inbetween) has undefined behaviour.
387-
* </p>
388-
*
389-
* @param identifier
390-
* The identifier of the item to which the listener should be
391-
* attached; must not be <code>null</code>.
392-
* @param listener
393-
* The listener to be added; must not be <code>null</code>.
394-
*/
395-
public void addPropertyChangeListener(String identifier,
396-
IPropertyChangeListener listener);
397-
398-
/**
399-
* An accessor for the accelerator associated with the item indicated by
400-
* the identifier. This identifier is specific to mechanism being used.
401-
* In the case of the Eclipse workbench, this is the command identifier.
402-
*
403-
* @param identifier
404-
* The identifier of the item from which the accelerator
405-
* should be obtained ; must not be <code>null</code>.
406-
* @return An integer representation of the accelerator. This is the
407-
* same accelerator format used by SWT.
408-
*/
409-
public Integer getAccelerator(String identifier);
410-
411-
/**
412-
* An accessor for the accelerator text associated with the item
413-
* indicated by the identifier. This identifier is specific to mechanism
414-
* being used. In the case of the Eclipse workbench, this is the command
415-
* identifier.
416-
*
417-
* @param identifier
418-
* The identifier of the item from which the accelerator text
419-
* should be obtained ; must not be <code>null</code>.
420-
* @return A string representation of the accelerator. This is the
421-
* string representation that should be displayed to the user.
422-
*/
423-
public String getAcceleratorText(String identifier);
424-
425-
/**
426-
* Checks to see whether the given accelerator is being used by some
427-
* other mechanism (outside of the menus controlled by JFace). This is
428-
* used to keep JFace from trying to grab accelerators away from someone
429-
* else.
430-
*
431-
* @param accelerator
432-
* The accelerator to check -- in SWT's internal accelerator
433-
* format.
434-
* @return <code>true</code> if the accelerator is already being used
435-
* and shouldn't be used again; <code>false</code> otherwise.
436-
*/
437-
public boolean isAcceleratorInUse(int accelerator);
438-
439-
/**
440-
* Checks whether the item matching this identifier is active. This is
441-
* used to decide whether a contribution item with this identifier
442-
* should be made visible. An inactive item is not visible.
443-
*
444-
* @param identifier
445-
* The identifier of the item from which the active state
446-
* should be retrieved; must not be <code>null</code>.
447-
* @return <code>true</code> if the item is active; <code>false</code>
448-
* otherwise.
449-
*/
450-
public boolean isActive(String identifier);
451-
452-
/**
453-
* Removes a listener from the object referenced by
454-
* <code>identifier</code>. This identifier is specific to mechanism
455-
* being used. In the case of the Eclipse workbench, this is the command
456-
* identifier.
457-
*
458-
* @param identifier
459-
* The identifier of the item to from the listener should be
460-
* removed; must not be <code>null</code>.
461-
* @param listener
462-
* The listener to be removed; must not be <code>null</code>.
463-
*/
464-
public void removePropertyChangeListener(String identifier,
465-
IPropertyChangeListener listener);
466-
}
467-
468468
/**
469469
* The singleton instance of this class. This value may be <code>null</code>--
470470
* if it has not yet been initialized.

0 commit comments

Comments
 (0)