diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/AutomatedSuite.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/AutomatedSuite.java index 8e68d4be111..d11589743ac 100644 --- a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/AutomatedSuite.java +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/AutomatedSuite.java @@ -33,6 +33,7 @@ import org.eclipse.jdt.ui.tests.callhierarchy.CallHierarchyContentProviderTest; import org.eclipse.jdt.ui.tests.core.CoreTestSuite; import org.eclipse.jdt.ui.tests.core.CoreTests; +import org.eclipse.jdt.ui.tests.editor.ClassFileEditorTests; import org.eclipse.jdt.ui.tests.hover.JavadocHoverTests; import org.eclipse.jdt.ui.tests.hover.MarkdownCommentTests; import org.eclipse.jdt.ui.tests.hover.PackageJavadocTests; @@ -87,7 +88,8 @@ PackageJavadocTests.class, JavadocHoverTests.class, MarkdownCommentTests.class, - SmokeViewsTest.class + SmokeViewsTest.class, + ClassFileEditorTests.class }) public class AutomatedSuite { @BeforeEach diff --git a/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/editor/ClassFileEditorTests.java b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/editor/ClassFileEditorTests.java new file mode 100644 index 00000000000..100d6fa6e62 --- /dev/null +++ b/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/editor/ClassFileEditorTests.java @@ -0,0 +1,266 @@ +package org.eclipse.jdt.ui.tests.editor; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; + +import java.io.File; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; + +import org.eclipse.jdt.testplugin.JavaProjectHelper; +import org.eclipse.jdt.testplugin.util.DisplayHelper; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Label; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.jobs.Job; + +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IViewPart; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.ide.IDE; +import org.eclipse.ui.intro.IIntroManager; +import org.eclipse.ui.intro.IIntroPart; + +import org.eclipse.jdt.core.IClasspathAttribute; +import org.eclipse.jdt.core.IClasspathEntry; +import org.eclipse.jdt.core.IJavaProject; +import org.eclipse.jdt.core.IOrdinaryClassFile; +import org.eclipse.jdt.core.JavaCore; +import org.eclipse.jdt.core.JavaModelException; + +import org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor; +import org.eclipse.jdt.internal.ui.javaeditor.DelayedEditorInput; +import org.eclipse.jdt.internal.ui.javaeditor.InternalClassFileEditorInput; + +public class ClassFileEditorTests { + + class DelayedEditorInputTestController { + + private IEditorInput fInput; + private boolean fDelayFinished; + + public DelayedEditorInputTestController() { + + } + + public void setDelayFinished(boolean delayFinished) { + fDelayFinished= delayFinished; + } + + public void setInput(IEditorInput input) { + fInput= input; + } + + public IEditorInput getInput() { + return fInput; + } + + public boolean isDelayFinished() { + return fDelayFinished; + } + } + + private static boolean welcomeClosed; + IViewPart view; + private IWorkbenchWindow window; + private IJavaProject javaProject ; + private IEditorPart editor; + + @Before + public void setUp() throws Exception { + window = setupWindow(); + javaProject = createProject(); + DisplayHelper.driveEventQueue(Display.getDefault()); + } + + @After + public void tearDown() throws Exception { + if (window != null) { + if (editor != null) { + window.getActivePage().closeEditor(editor, false); + } + if (view != null) { + window.getActivePage().hideView(view); + } + DisplayHelper.driveEventQueue(Display.getDefault()); + } + if (javaProject != null) { + JavaProjectHelper.delete(javaProject); + } + } + + private static IWorkbenchWindow setupWindow() { + IWorkbench workbench = PlatformUI.getWorkbench(); + if (!welcomeClosed) { + closeIntro(workbench); + } + IWorkbenchWindow wwindow = workbench.getActiveWorkbenchWindow(); + if (wwindow == null) { + wwindow = workbench.getWorkbenchWindows()[0]; + } + return wwindow; + } + + private static void closeIntro(final IWorkbench wb) { + IWorkbenchWindow window = wb.getActiveWorkbenchWindow(); + if (window != null) { + IIntroManager im = wb.getIntroManager(); + IIntroPart intro = im.getIntro(); + if (intro != null) { + welcomeClosed = im.closeIntro(intro); + DisplayHelper.driveEventQueue(Display.getDefault()); + } + } + } + + @Test + public void delayedEditorInputNeg0() throws PartInitException, OperationCanceledException, InterruptedException { + var testController = new DelayedEditorInputTestController(); + DelayedEditorInput input = new DelayedEditorInput(javaProject, null) { + + @Override + public org.eclipse.ui.IEditorInput getDelayedIEditorInput() { + return testController.getInput(); + } + + @Override + public boolean delayIsFinished() { + return testController.isDelayFinished(); + } + + }; + testController.setInput(input); + testController.setDelayFinished(false); + + IEditorPart ceditor = IDE.openEditor(window.getActivePage(), input, "org.eclipse.jdt.ui.ClassFileEditor", true); + assertNotNull("Class file editor should be opened", ceditor); + assertTrue("Class File editor should be of same type", ceditor instanceof ClassFileEditor); + + Composite composite = ceditor.getAdapter(Composite.class); + assertNotNull("The parent composite of the class file editor should exist", composite); + + assertEquals("Composite must have two children", 2, composite.getChildren().length); + assertTrue("First child must be a label", composite.getChildren()[0] instanceof Label); + assertSame("The icon must be the default working icon of SWT", + Display.getDefault().getSystemImage(SWT.ICON_WORKING), + ((Label)composite.getChildren()[0]).getImage()); + + assertTrue("Second child must be a label", composite.getChildren()[1] instanceof Label); + assertEquals("The hint didn't matched", + "Classpath initialization of the corresponding project is in progress. The content of this editor is going to be loaded.", + ((Label)composite.getChildren()[1]).getText()); + + testController.setDelayFinished(true); + + Job.getJobManager().join(DelayedEditorInput.class, new NullProgressMonitor()); + + assertEquals("Composite must have two children", 2, composite.getChildren().length); + assertTrue("First child must be a label", composite.getChildren()[0] instanceof Label); + assertSame("The icon must be the default error icon of SWT", + Display.getDefault().getSystemImage(SWT.ICON_ERROR), + ((Label)composite.getChildren()[0]).getImage()); + + assertTrue("Second child must be a label", composite.getChildren()[1] instanceof Label); + assertEquals("The hint didn't matched", + "Classpath initialization is done, but the correct input couldn't be restored.", + ((Label)composite.getChildren()[1]).getText()); + + DisplayHelper.driveEventQueue(Display.getDefault()); + } + + @Test + public void delayedEditorInput() throws JavaModelException, PartInitException, OperationCanceledException, InterruptedException { + IOrdinaryClassFile classfile = (IOrdinaryClassFile) javaProject.findElement(new Path("java/lang/String.java")); + assertNotNull("java.lang.String class not found", classfile); + InternalClassFileEditorInput origInp = new InternalClassFileEditorInput(classfile); + + var testController = new DelayedEditorInputTestController(); + DelayedEditorInput input = new DelayedEditorInput(javaProject, null) { + + @Override + public org.eclipse.ui.IEditorInput getDelayedIEditorInput() { + return testController.getInput(); + } + + @Override + public boolean delayIsFinished() { + return testController.isDelayFinished(); + } + + }; + testController.setInput(input); + testController.setDelayFinished(false); + + IEditorPart ceditor = IDE.openEditor(window.getActivePage(), input, "org.eclipse.jdt.ui.ClassFileEditor", true); + assertNotNull("Class file editor should be opened", ceditor); + assertTrue("Class File editor should be of same type", ceditor instanceof ClassFileEditor); + + Composite composite = ceditor.getAdapter(Composite.class); + assertNotNull("The parent composite of the class file editor should exist", composite); + + assertNull(((ClassFileEditor) ceditor).getViewer()); + + assertEquals("Composite must have two children", 2, composite.getChildren().length); + assertTrue("First child must be a label", composite.getChildren()[0] instanceof Label); + assertSame("The icon must be the default working icon of SWT", + Display.getDefault().getSystemImage(SWT.ICON_WORKING), + ((Label)composite.getChildren()[0]).getImage()); + + assertTrue("Second child must be a label", composite.getChildren()[1] instanceof Label); + assertEquals("The hint didn't matched", + "Classpath initialization of the corresponding project is in progress. The content of this editor is going to be loaded.", + ((Label)composite.getChildren()[1]).getText()); + + testController.setInput(origInp); + testController.setDelayFinished(true); + + Job.getJobManager().join(DelayedEditorInput.class, new NullProgressMonitor()); + + assertNotNull(((ClassFileEditor) ceditor).getViewer()); + + DisplayHelper.driveEventQueue(Display.getDefault()); + } + + private IJavaProject createProject() throws CoreException { + IJavaProject project = JavaProjectHelper.createJavaProject("SmokeViewsTest", "bin"); + + String javaHome = System.getProperty("java.home") + File.separator; + String latestSupportedJavaVersion = JavaCore.latestSupportedJavaVersion(); + String jdkRelease = System.getProperty("java.specification.version"); + if(jdkRelease.compareTo(latestSupportedJavaVersion) >= 0) { + JavaProjectHelper.setLatestCompilerOptions(project); + } else { + // Smallest version available for tests on Jenkins/jipp + JavaProjectHelper.set18CompilerOptions(project); + } + + Path bootModPath = new Path(javaHome + "/lib/jrt-fs.jar"); + Path sourceAttachment = new Path(javaHome + "/lib/src.zip"); + + IClasspathAttribute[] attributes = { JavaCore.newClasspathAttribute(IClasspathAttribute.MODULE, "true") }; + IClasspathEntry jrtEntry = JavaCore.newLibraryEntry(bootModPath, sourceAttachment, null, null, attributes, false); + IClasspathEntry[] old = project.getRawClasspath(); + IClasspathEntry[] newPath = new IClasspathEntry[old.length + 1]; + System.arraycopy(old, 0, newPath, 0, old.length); + newPath[old.length] = jrtEntry; + project.setRawClasspath(newPath, null); + DisplayHelper.driveEventQueue(Display.getDefault()); + return project; + } +} diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/BasicJavaEditorActionContributor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/BasicJavaEditorActionContributor.java index 8225c3bb220..e928a20733a 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/BasicJavaEditorActionContributor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/BasicJavaEditorActionContributor.java @@ -177,7 +177,9 @@ public void contributeToMenu(IMenuManager menu) { */ @Override public void setActiveEditor(IEditorPart part) { - + if (part != null && part.getEditorInput() instanceof DelayedEditorInput) { + return; + } super.setActiveEditor(part); ITextEditor textEditor= null; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java index 8ba16f2fa1f..f0d5e0a39fa 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditor.java @@ -32,6 +32,7 @@ import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Layout; import org.eclipse.swt.widgets.Shell; import org.eclipse.core.runtime.Assert; @@ -47,6 +48,8 @@ import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.resource.JFaceResources; @@ -62,12 +65,14 @@ import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IEditorSite; import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.IMemento; import org.eclipse.ui.IWorkbenchCommandConstants; import org.eclipse.ui.PartInitException; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.actions.ActionContext; import org.eclipse.ui.actions.ActionGroup; import org.eclipse.ui.navigator.ICommonMenuConstants; +import org.eclipse.ui.progress.UIJob; import org.eclipse.ui.texteditor.IDocumentProvider; import org.eclipse.ui.texteditor.ITextEditorActionConstants; @@ -509,6 +514,7 @@ private boolean isEqualInput(IEditorInput input1, IEditorInput input2) { * @since 3.3 */ private StyledText fNoSourceTextWidget; + private IEditorInput fInput; /** * Default constructor. @@ -651,6 +657,20 @@ protected IEditorInput transformEditorInput(IEditorInput input) { return input; } + @Override + public IEditorInput getEditorInput() { + if (fInput == null) { + return super.getEditorInput(); + } else if (fInput instanceof DelayedEditorInput delayedInput && delayedInput.delayIsFinished()) { + IEditorInput originalInput = delayedInput.getDelayedIEditorInput(); + if(originalInput == null) { + return fInput; + } + return fInput = originalInput; + } + return fInput; + } + @Override public void init(IEditorSite site, IEditorInput input) throws PartInitException { JavaCore.runReadOnly(() -> super.init(site, input)); @@ -660,6 +680,35 @@ public void init(IEditorSite site, IEditorInput input) throws PartInitException */ @Override protected void doSetInput(IEditorInput input) throws CoreException { + fInput= input; + if (input instanceof DelayedEditorInput delayedInput) { + delayedInput.executeDelayed(() -> { + if (getEditorInput() instanceof DelayedEditorInput) { + return; + } + new UIJob(JavaEditorMessages.ClassFileEditor_Initialize_editor_content) { + + @Override + public IStatus runInUIThread(IProgressMonitor monitor) { + try { + // revert the state after delay is finish, because input validation can't be executed in this state. + fParent = null; + + JavaCore.runReadOnly(() -> doSetInputCached(delayedInput.getDelayedIEditorInput())); + } catch (CoreException e) { + ExceptionHandler.log(e, e.getMessage()); + } + return Status.OK_STATUS; + } + + @Override + public boolean belongsTo(Object family) { + return DelayedEditorInput.class == family; + } + }.schedule(); + }); + return; + } JavaCore.runReadOnly(() -> doSetInputCached(input)); } private void doSetInputCached(IEditorInput input) throws CoreException { @@ -754,7 +803,47 @@ protected void selectionChanged() { */ @Override public void createPartControl(Composite parent) { - JavaCore.runReadOnly(() -> createPartControlCached(parent)); + fParent = parent; + if (fInput instanceof DelayedEditorInput delayedInput) { + Layout originalLayout = parent.getLayout(); + + GridLayoutFactory.fillDefaults().margins(15, 15).applyTo(parent); + + Label lIcon= new Label(parent, SWT.WRAP); + GridDataFactory.fillDefaults().grab(false, false).applyTo(lIcon); + lIcon.setImage(Display.getDefault().getSystemImage(SWT.ICON_WORKING)); + + Label lHint= new Label(parent, SWT.WRAP); + GridDataFactory.fillDefaults().grab(true, false).applyTo(lHint); + lHint.setText(JavaEditorMessages.ClassFileEditor_Initialize_in_progress); + + delayedInput.executeDelayed(() -> { + var job = new UIJob(JavaEditorMessages.ClassFileEditor_Create_editor_ui) { + @Override + public IStatus runInUIThread(IProgressMonitor monitor) { + if (getEditorInput() instanceof DelayedEditorInput) { + lIcon.setImage(Display.getDefault().getSystemImage(SWT.ICON_ERROR)); + lHint.setText(JavaEditorMessages.ClassFileEditor_Input_could_not_be_resolved); + } else { + lIcon.dispose(); + lHint.dispose(); + parent.setLayout(originalLayout); + JavaCore.runReadOnly(() -> createPartControlCached(parent)); + } + return Status.OK_STATUS; + } + + @Override + public boolean belongsTo(Object family) { + return DelayedEditorInput.class == family; + } + + }; + job.schedule(); + }); + } else { + JavaCore.runReadOnly(() -> createPartControlCached(parent)); + } } private void createPartControlCached(Composite parent) { @@ -972,4 +1061,42 @@ public void setFocus() { fSourceAttachmentForm.setFocus(); } } + + @Override + protected void doRestoreState(IMemento memento) { + if (getEditorInput() instanceof DelayedEditorInput delayedInput) { + delayedInput.executeDelayed(() -> { + if (getEditorInput() instanceof DelayedEditorInput) { + return; + } + new UIJob(JavaEditorMessages.ClassFileEditor_Restore_editor_state) { + + @Override + public IStatus runInUIThread(IProgressMonitor monitor) { + ClassFileEditor.super.doRestoreState(memento); + + return Status.OK_STATUS; + } + + @Override + public boolean belongsTo(Object family) { + return DelayedEditorInput.class == family; + } + }.schedule(); + }); + return; + } + super.doRestoreState(memento); + } + + @SuppressWarnings("unchecked") + @Override + public T getAdapter(Class required) { + if (required == Composite.class) { + if (required.isAssignableFrom(fParent.getClass())) { + return (T) fParent; + } + } + return super.getAdapter(required); + } } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditorInputFactory.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditorInputFactory.java index f90146c7624..765d989bbd4 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditorInputFactory.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/ClassFileEditorInputFactory.java @@ -14,8 +14,11 @@ package org.eclipse.jdt.internal.ui.javaeditor; +import java.util.function.Supplier; + import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.ui.IEditorInput; import org.eclipse.ui.IElementFactory; import org.eclipse.ui.IMemento; @@ -60,9 +63,17 @@ public IAdaptable createElement(IMemento memento) { IJavaProject project= element.getJavaProject(); if (project != null) { type= project.findType(type.getFullyQualifiedName()); - if (type == null) - return null; - element= type.getParent(); + if (type == null) { + if (!JavaCore.hasResolvedAllClasspathContainers(project)) { + return new DelayedEditorInput(project, (Supplier) () -> { + return (IEditorInput) createElement(memento); + }); + } else { + return null; + } + } else { + element= type.getParent(); + } } } return EditorUtility.getEditorInput(element); diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/DelayedEditorInput.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/DelayedEditorInput.java new file mode 100644 index 00000000000..2a0d7edfece --- /dev/null +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/DelayedEditorInput.java @@ -0,0 +1,125 @@ +package org.eclipse.jdt.internal.ui.javaeditor; + +import java.util.ArrayList; +import java.util.function.Supplier; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; + +import org.eclipse.jface.resource.ImageDescriptor; + +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IPersistableElement; + +import org.eclipse.jdt.core.IClasspathContainer; +import org.eclipse.jdt.core.IJavaProject; +import org.eclipse.jdt.core.JavaCore; + +import org.eclipse.jdt.internal.ui.util.ExceptionHandler; + +/** + * This EditorInput implementation is delaying the access to the real {@link IEditorInput}. + * The delay will end if all of the {@link IClasspathContainer} are resolved. + * + * @see #delayIsFinished() + * @see #executeDelayed(Runnable) + */ +public class DelayedEditorInput implements IEditorInput { + + private Supplier fDelayedIAdaptableRetriever; + private final ArrayList runnables; + private final IJavaProject fProject; + + public DelayedEditorInput(IJavaProject project, Supplier delayedIAdaptableRetriever) { + runnables = new ArrayList<>(); + fProject= project; + fDelayedIAdaptableRetriever= delayedIAdaptableRetriever; + var job = new Job(JavaEditorMessages.DelayedEditorInput_Waiting_for_classpath_containers_initialization + project.getElementName()) { + @Override + public IStatus run(IProgressMonitor mon) { + while (!delayIsFinished() && !mon.isCanceled()) { + try { + Thread.sleep(100); + } catch (InterruptedException e) { + ExceptionHandler.log(e, e.getMessage()); + } + } + if(mon.isCanceled()) { + return Status.CANCEL_STATUS; + } else { + runnables.forEach(Runnable::run); + return Status.OK_STATUS; + } + } + @Override + public boolean belongsTo(Object family) { + return DelayedEditorInput.class == family; + } + }; + job.schedule(); + } + + @Override + public T getAdapter(Class adapter) { + return null; + } + + @Override + public boolean exists() { + return true; + } + + @Override + public ImageDescriptor getImageDescriptor() { + return null; + } + + @Override + public String getName() { + return JavaEditorMessages.DelayedEditorInput_delayed_editor_input; + } + + @Override + public IPersistableElement getPersistable() { + return null; + } + + @Override + public String getToolTipText() { + return null; + } + + /** + * Retrieves the original {@link IEditorInput} which wasn't possible because + * of the {@link IClasspathContainer}s were not loaded fully. + * + * @return the original {@link IEditorInput} + */ + public IEditorInput getDelayedIEditorInput() { + return fDelayedIAdaptableRetriever.get(); + } + + /** + * Method to add functionality to delay. Will be delayed if the {@link IClasspathContainer} + * are not resolved, otherwise executes this directly. + * + * @param runnable the runnable which should be executed + */ + public void executeDelayed(Runnable runnable) { + if (delayIsFinished()) { + runnable.run(); + } else { + runnables.add(runnable); + } + } + + /** + * @return true, if all classpath containers are resolved. + */ + public boolean delayIsFinished() { + return JavaCore.hasResolvedAllClasspathContainers(fProject); + } + +} diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.java index bd335620b71..f02d3db3b41 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.java @@ -53,10 +53,15 @@ private JavaEditorMessages() { public static String AddImportOnSelection_dialog_title; public static String AddImportOnSelection_dialog_message; public static String ClassFileEditor_changeExternalAnnotations_caption; + public static String ClassFileEditor_Create_editor_ui; public static String ClassFileEditor_error_classfile_not_on_classpath; public static String ClassFileEditor_error_invalid_input_message; public static String ClassFileEditor_error_title; public static String ClassFileEditor_error_message; + public static String ClassFileEditor_Initialize_editor_content; + public static String ClassFileEditor_Initialize_in_progress; + public static String ClassFileEditor_Input_could_not_be_resolved; + public static String ClassFileEditor_Restore_editor_state; public static String ClassFileEditor_SourceAttachmentForm_cannotconfigure; public static String ClassFileEditor_SourceAttachmentForm_notsupported; public static String ClassFileEditor_SourceAttachmentForm_readonly; @@ -175,6 +180,9 @@ private JavaEditorMessages() { public static String JavaElementSuperImplementationHyperlink_hyperlinkText_qualified; public static String AnnotateClassFile_label; + public static String DelayedEditorInput_delayed_editor_input; + public static String DelayedEditorInput_Waiting_for_classpath_containers_initialization; + static { NLS.initializeMessages(BUNDLE_NAME, JavaEditorMessages.class); } diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.properties b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.properties index 64f88e50067..ee798120822 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.properties +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditorMessages.properties @@ -26,6 +26,7 @@ AddImportOnSelection_dialog_title=Add Import AddImportOnSelection_dialog_message=&Choose element to generate an import statement for: ClassFileEditor_changeExternalAnnotations_caption=Change external annotations +ClassFileEditor_Create_editor_ui=Create Editor UI ClassFileEditor_error_classfile_not_on_classpath=The class file is not on the classpath ClassFileEditor_SourceAttachmentForm_cannotconfigure=The JAR of this class file belongs to container ''{0}'' can not be configured. ClassFileEditor_SourceAttachmentForm_notsupported=The JAR of this class file belongs to container ''{0}'' which does not support the attachment of sources to its entries. @@ -33,6 +34,10 @@ ClassFileEditor_error_invalid_input_message=The Class File Viewer cannot handle ClassFileEditor_SourceAttachmentForm_readonly=The JAR of this class file belongs to container ''{0}'' which does not allow modifications to source attachments on its entries. ClassFileEditor_error_title=Error Creating Editor ClassFileEditor_error_message=An error occurred while creating the class file editor. +ClassFileEditor_Initialize_editor_content=Initialize Editor Content +ClassFileEditor_Initialize_in_progress=Classpath initialization of the corresponding project is in progress. The content of this editor is going to be loaded. +ClassFileEditor_Input_could_not_be_resolved=Classpath initialization is done, but the correct input couldn't be restored. +ClassFileEditor_Restore_editor_state=Restore editor state ClassFileMarkerAnnotationModel_error_isAcceptable=ClassFileMarkerAnnotationModel.isAcceptable ClassFileMarkerAnnotationModel_error_isAffected=ClassFileMarkerAnnotationModel.isAffected @@ -168,3 +173,5 @@ Editor_OpenPropertiesFile_hyperlinkText= Open in ''{0}'' Editor_MoveLines_IllegalMove_status= Move not possible - Uncheck "Show Source of Selected Element Only" to see the entire document AnnotateClassFile_label=&Annotate +DelayedEditorInput_delayed_editor_input=Delayed editor input +DelayedEditorInput_Waiting_for_classpath_containers_initialization=Waiting for classpath containers initialization for