Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Issue with dynamic options
Issue with dynamic options [message #1647132] Tue, 03 March 2015 09:13 Go to next message
kkt8 Mising name is currently offline kkt8 Mising nameFriend
Messages: 22
Registered: September 2014
Junior Member
Hi,

I develop an IDE based on Eclipse CDT.

I added dynamic compiler options in my Build Settings, I struggled but I did it, it's relatively easy.

I have a strange behavior when I create a project and then I check one of my dynamic option, as long as the session remains open option remains checked but if I raise my workbench, option appears unchecked (while in the .cproject its value to "true").
By dint of searching, I realized that this was the only on the last project created, if I create 2, the first project is ok (the option appears checked) is the 2nd ko (the option appears unchecked).
If I make 3 projects, 1 project is ok (the option appears checked), the 2nd is ok (the option appears checked), the 3rd is ko (the option appears unchecked) .... The problem occurs ONLY on the last project! and after restarting the Workbench.

I compare the files of projects but nothing differs them, there must be something that goes wrong in closing the Workbench, but what ???

An idea ... ???
Thank you
Re: Issue with dynamic options [message #1684731 is a reply to message #1647132] Wed, 18 March 2015 14:57 Go to previous messageGo to next message
kkt8 Mising name is currently offline kkt8 Mising nameFriend
Messages: 22
Registered: September 2014
Junior Member
Hi,

After doing research ..
when Eclipse load the options of the selected tab my option has a value put to "true" .. great ! BUT at the end when the BooleanFieldEditor is created the value of the option turns to "false" Sad

the difference between a project where the option is really selected and a project where the option (the same) isn't selected is in the 1st case the superClasse isn't null while the 2d case the superClass is null ...
Why ?

for the 1st and the 2d project, this is the same option (built dynamically by my program) but the 2d project is the last ....

Help !!!
Chris
Re: Issue with dynamic options [message #1686959 is a reply to message #1684731] Thu, 19 March 2015 12:33 Go to previous messageGo to next message
kkt8 Mising name is currently offline kkt8 Mising nameFriend
Messages: 22
Registered: September 2014
Junior Member
Hi !

I've found a new track !
the last project (the project where the options previoulsy selected but not in the tab) has a source file open in the CEditor (the last project created). Then the project is loaded too early by the CEditor class and the others projects are loaded later ...
I think the las project is loaded too early and something after crash an information ???? Embarrassed

there is some extension point I can extend to close all the source file when the workbench is closed ???

Thank you
chris
Resolved : Issue with dynamic options [message #1688142 is a reply to message #1686959] Fri, 20 March 2015 08:16 Go to previous message
kkt8 Mising name is currently offline kkt8 Mising nameFriend
Messages: 22
Registered: September 2014
Junior Member
workbench.addWorkbenchListener(new IWorkbenchListener() {

			@Override
			public boolean preShutdown(IWorkbench workbench, boolean forced) {
				IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
				IEditorReference[] iep = page.getEditorReferences();
				if(iep.length > 0)
					iep[0].getPage().closeAllEditors(true);
				return true;
			}

			@Override
			public void postShutdown(IWorkbench workbench) {
				
			}
			 
		 });
Previous Topic:Compile in Eclipse and run in gnome-terminal (Ubuntu)
Next Topic:Custom CDT project
Goto Forum:
  


Current Time: Thu Apr 25 20:02:06 GMT 2024

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

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

Back to the top