Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Today's Messages (on)  | Unanswered Messages (off)

Forum: Java Development Tools (JDT)
 Topic: "Eclipse debugger will use less precise source lookup" message
Re: "Eclipse debugger will use less precise source lookup" message [message #1865091 is a reply to message #1865085] Fri, 26 April 2024 03:38
Eitan Rosenberg is currently offline Eitan RosenbergFriend
Messages: 143
Registered: October 2018
Senior Member
That is a good idea, thanks.
I have done this before.
Worth a try, I can see that there is 4.32M1 out there.
I can create a new install just to test this problem.
Now day's I use the SDK anyway (e.g. eclipse-SDK-4.31-win32-x86_64.zip) and add to it what I really use.
Re: "Eclipse debugger will use less precise source lookup" message [message #1865094 is a reply to message #1865091] Fri, 26 April 2024 04:09
Eitan Rosenberg is currently offline Eitan RosenbergFriend
Messages: 143
Registered: October 2018
Senior Member
eclipse-SDK-4.32M1-win32-x86_64.zip seems to solve the problem.
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 is currently offline David M. KarrFriend
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
Re: 2024-03 useless because can no longer bring up search dialog [message #1865100 is a reply to message #1865097] Fri, 26 April 2024 06:32
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
It's really very easy to create a development environment and contribute fixes:

https://github.com/eclipse-platform/.github/blob/main/CONTRIBUTING.md#creating-an-eclipse-development-environment

The fix is rather obvious and trivial:

https://github.com/eclipse-platform/eclipse.platform.ui/pull/1858

I can tell you from personal experience that the flood of email generated from GitHub is often overwhelming so one hopes that perhaps someone else will address whatever issue is raised. You can also pretty much rest assured that very likely no developer on these projects reads this forum.


Ed Merks
Professional Support: https://www.macromodeling.com/
Forum: EclipseLink
 Topic: Eclipselink4.0.2 jar compatibility queries
Eclipselink4.0.2 jar compatibility queries [message #1865106] Fri, 26 April 2024 12:34
Kalai S is currently offline Kalai SFriend
Messages: 1
Registered: April 2024
Junior Member
Is Eclipselink4.0.2 compatible with Java17, Eclipse 2023-03 and with javax.persistence-2.2.1 jar?
Re: Eclipselink4.0.2 jar compatibility queries [message #1865115 is a reply to message #1865106] Fri, 26 April 2024 14:09
Lukas JungmannFriend
Messages: 37
Registered: November 2013
Location: Prague, Czech Republic
Member
For javax, use EclipseLink 2.7.x, the latest one (2.7.14) supports SE 21 as well
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 is currently offline Thomas ChiangFriend
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
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

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 is currently offline Nick AnnableFriend
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 #1865103 is a reply to message #1865088] Fri, 26 April 2024 12:01
Francisco Martínez Lasaca is currently offline Francisco Martínez LasacaFriend
Messages: 3
Registered: March 2024
Junior Member
Hi Nick,

I don't know if there is a more orthodox way, but you can invoke IModel's propertyGetter with the desired property [1]. You can also get reference properties, and call 'add' over them.

Also note that M in this case is the name of the injected model [2], which happens to be "M" in the playground. You will need to substitute it appropriately in your code.

FML

[1] https://eclipse.dev/epsilon/playground/?60c92273
[2] https://github.com/epsilonlabs/playground/blob/main/src/main/java/org/eclipse/epsilon/live/RunEpsilonFunction.java#L188

[Updated on: Fri, 26 April 2024 12:06]

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
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2165
Registered: July 2009
Location: York, UK
Senior Member

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 is currently offline Ehsan AhmadFriend
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 #1865121 is a reply to message #1865118] Fri, 26 April 2024 16:29
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
Hi what you you mean by validator
In the editor? In the build ?
Both
Can you provide stackstrace?

Why is it a problem in the first place


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
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 is currently offline Ehsan AhmadFriend
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 #1865127 is a reply to message #1865124] Fri, 26 April 2024 16:54
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
But how would the build know what the active file is
Maybe you want to to temporarily disable project-> build automatically


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
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 is currently offline Ehsan AhmadFriend
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 #1865133 is a reply to message #1865130] Fri, 26 April 2024 18:13
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
but a validation always will be local.
do you want to restrict scoping (org.eclipse.xtext.scoping.impl.ImportedNamespaceAwareLocalScopeProvider.getGlobalScope) or affected calc so that files cant see each other (org.eclipse.xtext.resource.IResourceDescription.Manager.isAffectedMethod),


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
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 is currently offline Ehsan AhmadFriend
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 #1865139 is a reply to message #1865136] Fri, 26 April 2024 19:18
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
Why is it a problem all 4 files get validated by the build
They are all in the project

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


I am still struggling to understand your problems in the first case


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
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 is currently offline Ehsan AhmadFriend
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



Current Time: Fri Apr 26 23:22:17 GMT 2024

Powered by FUDForum. Page generated in 0.06609 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top