Forum: Java Development Tools (JDT) |
---|
Topic: "Eclipse debugger will use less precise source lookup" message |
---|
|
|
Forum: Newcomers |
---|
Topic: 2024-03 useless because can no longer bring up search dialog |
---|
2024-03 useless because can no longer bring up search dialog [message #1865097] |
Fri, 26 April 2024 05:10 |
David M. Karr Messages: 802 Registered: July 2009 |
Senior Member |
|
|
For quite a while, I've had a problem with Eclipse 2024-03 that makes severely handicapped. For some reason, some time after a workspace is created, the Search Dialog simply stops appearing. Usually, I can use a workspace for a week or so before it gets into this state, and it never comes out of it. My only workaround so far has been to create a new workspace. This is somewhat annoying, as I have dozens of git repos and projects associated with those repos, although I'm now getting used to the keyboard shortcuts to import a repo in a particular way. Nevertheless, it is quite painful to have to do this every week or so.
However, it's now gotten much worse. I only just created a new workspace today. Search was working earlier today, but now it's gone again. This time it only lasted a few hours.
I do find that I have not seen this issue in 2023-09. I have a feeling I'm going to be stuck with that version for quite a while.
In the error log, the indication that this is happening is shown from the following stack trace:
!ENTRY org.eclipse.e4.ui.workbench 4 0 2024-04-25 22:00:32.330
!MESSAGE Execution exception for: ParameterizedCommand(Command(org.eclipse.search.ui.openSearchDialog,Open Search Dialog,
Open the Search dialog,
Category(org.eclipse.search.ui.category.search,Search,Search command category,true),
WorkbenchHandlerServiceHandler("org.eclipse.search.ui.openSearchDialog"),
,,true),null) in
context chain: WorkbenchContext -> TrimmedWindowImpl (IDEWindow) Context -> PerspectiveImpl (org.eclipse.jdt.ui.JavaPerspective) Context -> PartImpl (org.eclipse.e4.ui.compatibility.editor) removeOnHide (pl_idp_ms.groovy) Context
!STACK 0
org.eclipse.core.commands.ExecutionException: Error executing 'org.eclipse.search.ui.openSearchDialog': java.lang.NullPointerException: Cannot invoke "org.eclipse.ui.IEditorPart.getAdapter(java.lang.Class)" because "editor" is null
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:179)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:204)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:569)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:644)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:439)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1287)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1065)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1090)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1075)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1117)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1113)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1594)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4866)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4744)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5039)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3658)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
Caused by: org.eclipse.e4.core.di.InjectionException: java.lang.NullPointerException: Cannot invoke "org.eclipse.ui.IEditorPart.getAdapter(java.lang.Class)" because "editor" is null
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:298)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:232)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:174)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:165)
... 42 more
Caused by: java.lang.NullPointerException: Cannot invoke "org.eclipse.ui.IEditorPart.getAdapter(java.lang.Class)" because "editor" is null
at org.eclipse.search.internal.ui.ScopePart.selectedResourcesFromEditors(ScopePart.java:247)
at org.eclipse.search.internal.ui.ScopePart.createPart(ScopePart.java:457)
at org.eclipse.search.internal.ui.SearchDialog.createPageControl(SearchDialog.java:763)
at org.eclipse.search.internal.ui.SearchDialog.createPageArea(SearchDialog.java:425)
at org.eclipse.search.internal.ui.util.ExtendedDialogWindow.createDialogArea(ExtendedDialogWindow.java:142)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:766)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1092)
at org.eclipse.search.internal.ui.SearchDialog.create(SearchDialog.java:290)
at org.eclipse.jface.window.Window.open(Window.java:788)
at org.eclipse.search.internal.ui.OpenSearchDialogAction.run(OpenSearchDialogAction.java:60)
at org.eclipse.search.internal.ui.OpenSearchDialogAction.run(OpenSearchDialogAction.java:50)
at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:285)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:98)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
I also created the following issue for this, although there hasn't bee much useful response:
https://github.com/eclipse-platform/eclipse.platform/issues/1151
|
|
|
|
Forum: EclipseLink |
---|
Topic: Eclipselink4.0.2 jar compatibility queries |
---|
|
|
Forum: Epsilon |
---|
Topic: Using EGL to instantiate an excel file |
---|
Using EGL to instantiate an excel file [message #1865112] |
Fri, 26 April 2024 13:48 |
Thomas Chiang Messages: 101 Registered: March 2020 |
Senior Member |
|
|
Hello,
I've got an EGL script that generates an XML file based on an ECore model that I've defined. However, when I run the EGL file it outputs the correct information to the console but doesn't write it to the designated target file.
For now I copy and paste it into the XML file, but then I'm not sure how to apply the XML file to my target Excel file so that it populates the header columns in the excel file to match the XML specification. Any ideas for how to remove the manual work so it can all be done through EGL or another language would be appreciated.
|
|
|
Re: Using EGL to instantiate an excel file [message #1865142 is a reply to message #1865112] |
Fri, 26 April 2024 20:53 |
|
Hi Thomas,
If you're running your EGL transformation from Eclipse, could you please check that in your run configuration you've selected the correct option in the "Template" tab ("Text generated should be printed to" -> "The following file")?
Thanks,
Dimitris
|
|
|
Topic: Alternative way to create references using EOL |
---|
Alternative way to create references using EOL [message #1865088] |
Fri, 26 April 2024 00:42 |
Nick Annable Messages: 5 Registered: March 2020 |
Junior Member |
|
|
For example consider an ECore metamodel M with two classes C1 and C2, and one reference between them with the label L at the C2 end. If I have c1 : C1 and c2 : C2 in my model, I can add a reference to c2 using the line c1.L.add(c2).
However I am wondering if there is an alternative way to add that relationship using the name of the reference as a string. This would be similar to creating a class using the name as a string by doing var c1 = M.createInstance('C1') instead of var c1 = new M:C1.
Thank you for your help!
[Updated on: Fri, 26 April 2024 00:44] Report message to a moderator
|
|
|
|
Re: Alternative way to create references using EOL [message #1865145 is a reply to message #1865103] |
Fri, 26 April 2024 20:57 |
|
Hi Nick,
Below and in https://eclipse.dev/epsilon/playground/?3618cfdc is a slightly more concise version and an alternative using EMF's reflective API.
// Prints the duration of the Analysis task
var analysis = Task.all.selectOne(t | t.title = "Analysis");
// Equivalent to Analysis.duration
var duration = M
.propertyGetter
.invoke(analysis, "duration");
duration.println("Analysis has a duration of ");
// Alternative using EMF's reflective API
var durationFeature = analysis.eClass().getEStructuralFeature("duration");
duration = analysis.eGet(durationFeature);
duration.println("Analysis has a duration of ");
Thanks,
Dimitris
|
|
|
Forum: TMF (Xtext) |
---|
Topic: How to restrict validator to the active working file? |
---|
How to restrict validator to the active working file? [message #1865118] |
Fri, 26 April 2024 16:13 |
Ehsan Ahmad Messages: 37 Registered: April 2018 |
Member |
|
|
Hi,
I have 4 different model files (of the same metamodel) and my validation checks are applied on all on them while I am working on one of them. All the model files need to be in the same project folder.
Is it possible to restrict validator to one active working file only?
Thanks,
Ehsan
|
|
|
|
Re: How to restrict validator to the active working file? [message #1865124 is a reply to message #1865121] |
Fri, 26 April 2024 16:38 |
Ehsan Ahmad Messages: 37 Registered: April 2018 |
Member |
|
|
I mean after the build. I have four different model files my DSL. For example, first.mydsl, second.mydsl, third.mydsl, and four.mydsl. All in the same project in runtime Eclipse application.
I have implemented the following Check in Validator class:
@Check(CheckType.FAST)
public void checkInitialValueMatchesType(Variable var){
if(var.getBasic_type().equals("boolean")) {
error("boolean type", DevsPackage.Literals.VARIABLE__INITIAL_VALUE);
}
}
This check runs on all files (first, second, third, fourth) while I am working in second.mydsl. I want this check to run only for second.mydsl.
Thanks.
|
|
|
|
Re: How to restrict validator to the active working file? [message #1865130 is a reply to message #1865127] |
Fri, 26 April 2024 17:34 |
Ehsan Ahmad Messages: 37 Registered: April 2018 |
Member |
|
|
Thank you for your replies Christian.
Temporarily disabling project-> build automatically does not work.
How does it apply the NamesAreUniqueValidator?
here is the part of my grammar for states
BehaviorStatesSection:
'states' behavior_states+=BehaviorState+
;
BehaviorState:
name=ID ':' (isInitial='initial')? state_sigma = Sigma ';'
;
It allows me to declare states with same names in different files but but not in the same file. For example, file second.mydsl cannot have two states with name "Start" but file first.mydsl and second.mydsl both can have one "Start" state.
Now, I am applying to the following Check to ensure that there is only one initial state in one model file(e.g, first.mydsl).
@Check(CheckType.NORMAL)
public void checkOnlyOneInitialState(BehaviorState behaviorState) {
int initialStateCount = 0;
BehaviorStatesSection bss = (BehaviorStatesSection) behaviorState.eContainer();
for (BehaviorState bs : bss.getBehavior_states()) {
if(bs.getIsInitial().equals("initial"))
initialStateCount = initialStateCount +1;
}
if (initialStateCount > 1)
error(behaviorState.getName(), DevsPackage.Literals.BEHAVIOR_STATE__NAME);
}
This Check must be applied to only the active file I am working on like NamesAreUniqueValidator.
Regards,
Ehsan
|
|
|
|
Re: How to restrict validator to the active working file? [message #1865136 is a reply to message #1865133] |
Fri, 26 April 2024 18:28 |
Ehsan Ahmad Messages: 37 Registered: April 2018 |
Member |
|
|
>> but a validation always will be local.
What do you mean by local? It will check on the currently working file only? This is not the case for me. It seems validation is check global (my understanding).
>> do you want to restrict scoping ....
I am using ImportUriValidator
composedCheck = "org.eclipse.xtext.validation.ImportUriValidator"
Can this make validation global?
Thanks
|
|
|
|
Re: How to restrict validator to the active working file? [message #1865148 is a reply to message #1865139] |
Fri, 26 April 2024 21:26 |
Ehsan Ahmad Messages: 37 Registered: April 2018 |
Member |
|
|
>> If you use imports then the files see each other and should see each other
So a change to one file can make another invalid
Yes. I agree the files should see each other.
>> I am still struggling to understand your problems in the first case.
Here is the problem statement. Each file has an atomic component and each atomic component has a states but only one state can be marked as initial state in each file/atomic component.
Below is states section of the file first.mydsl.
states
Start: initial 0.0;
Chk_Mode: pd;
Set_Vars: 0.0;
Here is the states section of the second.mydsl:
states
Start: initial 0.0;
Chk_Status: pd;
Print_Vars: 0.0;
Each file can have its own initial state but currently the validator checks initial states across both files and only allows initial state in one of the them.
I hope this describes the problem.
Thanks very much.
Ehsan
|
|
|
Powered by
FUDForum. Page generated in 0.06609 seconds