Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Package Presentation -> Hierarchical preference not saving(Eclipse MARS doesn't save preferences details)
Package Presentation -> Hierarchical preference not saving [message #1725176] Tue, 01 March 2016 11:38 Go to next message
Flavio FB is currently offline Flavio FBFriend
Messages: 10
Registered: June 2015
Junior Member
Hello,

I'm experiencing some problem saving the package presentation type as Hierarchical on Eclipse Mars:

Version: Mars.1 Release (4.5.1)
Build id: 20150924-1200

Operating System: Windows 7 Professional x64

Please ask if more details are needed.
Re: Package Presentation -> Hierarchical preference not saving [message #1725180 is a reply to message #1725176] Tue, 01 March 2016 12:03 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31558
Registered: July 2009
Senior Member
"Some problem" could mean anything whatsoever. Please describe the
steps that I would need to follow in order to reproduce the problem that
you seem to be seeing.


On 01.03.2016 12:38, Flavio B wrote:
> Hello,
> I'm experiencing some problem saving the package presentation type as
> Hierarchical on Eclipse Mars:
>
> Version: Mars.1 Release (4.5.1)
> Build id: 20150924-1200
>
> Operating System: Windows 7 Professional x64
>
> Please ask if more details are needed.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Package Presentation -> Hierarchical preference not saving [message #1725198 is a reply to message #1725180] Tue, 01 March 2016 14:56 Go to previous messageGo to next message
Flavio FB is currently offline Flavio FBFriend
Messages: 10
Registered: June 2015
Junior Member
OK, sorry.
You are right.

Well, premise that this bug seems to not be present on another machine I am using (Linux) and another one with Windows 7 Pro, this happens in the installation I am currently using:

Steps to reproduce:
1) Open Eclipse starting C:\Program Files\eclipse\eclipse.exe
2) Switch to JavaEE perspective if not already opened
3) Open Package Explorer
4) Click on the Vew Menu -> Package Presentation -> Hierarchical
index.php/fa/25150/0/
5) See the effects of this change (OK)
6) Close Eclipse
7) Open Eclipse
8 ) Package presentation is reset to Flat in Package Explorer and Step 4 has to be repeated
Re: Package Presentation -> Hierarchical preference not saving [message #1725715 is a reply to message #1725198] Mon, 07 March 2016 09:20 Go to previous messageGo to next message
Flavio FB is currently offline Flavio FBFriend
Messages: 10
Registered: June 2015
Junior Member
UP

Ed Merks: was I precise enough with the problem description?
If not, please let me know if I can do better. The problem still persists.
Re: Package Presentation -> Hierarchical preference not saving [message #1725901 is a reply to message #1725715] Tue, 08 March 2016 12:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31558
Registered: July 2009
Senior Member
Flavio,

That settings is stored in the dialog settings in the workspace. I.e.,
in
<workspace>/.metadata/.plugins/org.eclipse.jdt.ui/dialog_settings.xml.
Is that file updated when you change the layout? Presumably you are
opening the IDE with the same workspace, otherwise it will be just the
default or whatever is saved for that workspace.


On 07.03.2016 10:20, Flavio B wrote:
> UP
>
> Ed Merks: was I precise enough with the problem description?
> If not, please let me know if I can do better. The problem still
> persists.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Package Presentation -&amp;gt; Hierarchical preference not saving [message #1725909 is a reply to message #1725901] Tue, 08 March 2016 13:30 Go to previous messageGo to next message
Flavio FB is currently offline Flavio FBFriend
Messages: 10
Registered: June 2015
Junior Member
Hi!

thanks a lot for replying.
The file you mentioned looks like it's being modified when I start Eclipse, before selecting the workspace (it's weird).

I don't find exactly what is the relevant part and the settings to be checked, but I see there's no change stored on shutdown or when I select the hierarchical package presentation (basically the xml file I opened with an external editor does not get reloaded by the editor since it doesn't detect any change).

I think this is the relevant part:
<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
[...]
</section>


I'm not sure what I have to check to find out if the setting has been stored or not.
Re: Package Presentation -&amp;amp;gt; Hierarchical preference not saving [message #1726421 is a reply to message #1725909] Sun, 13 March 2016 11:04 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31558
Registered: July 2009
Senior Member
When I shutdown, the value changes. I.e, if I switch to hierarchical,
it changes to this:

<item value="1" key="layout"/>

So if you don't see it changing when you shutdown (and the dialog
settings should be flushed), then likely there's a shutdown problem of
some sort preventing that from being saved.

You could try showing the Error Log view, clearing it, and seeing if
there are problems logged when you shutdown and restart.


On 08.03.2016 14:30, Flavio B wrote:
> Hi!
>
> thanks a lot for replying.
> The file you mentioned looks like it's being modified when I start
> Eclipse, before selecting the workspace (it's weird).
>
> I don't find exactly what is the relevant part and the settings to be
> checked, but I see there's no change stored on shutdown or when I
> select the hierarchical package presentation (basically the xml file I
> opened with an external editor does not get reloaded by the editor
> since it doesn't detect any change).
>
> I think this is the relevant part:
> <section
> name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
> [...]
> </section>
>
> I'm not sure what I have to check to find out if the setting has been
> stored or not.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Package Presentation -&amp;amp;gt; Hierarchical preference not saving [message #1726426 is a reply to message #1726421] Sun, 13 March 2016 13:08 Go to previous messageGo to next message
Flavio FB is currently offline Flavio FBFriend
Messages: 10
Registered: June 2015
Junior Member
Hi!

I've checked the value <item value="1" key="layout"/> and I see it was already set like that.
It doesn't change whenever I change the package presentation option. I've also made sure to have all the RW permissions on the eclipse directory, and it is OK.

As regard the Error Log view, it doesn't say anything when I change the package presentation.
Re: Package Presentation -&amp;amp;amp;gt; Hierarchical preference not saving [message #1726429 is a reply to message #1726426] Sun, 13 March 2016 13:31 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31558
Registered: July 2009
Senior Member
Flavio,

Comments below.

On 13.03.2016 14:08, Flavio B wrote:
> Hi!
>
> I've checked the value <item value="1" key="layout"/> and I see it was
> already set like that.
And it stays that way? And it's in the workspace you're opening? You
mentioned something about it being changed. If you change the setting
to flat and quit, does this value change to 2?
> It doesn't change whenever I change the package presentation option.
As I mentioned, it's apparently saved on shutdown. So try to confirm
that changing it saves changes on shutdown. You can of course try to
change it in the file before you restart to see if that has the expected
impact.
> I've also made sure to have all the RW permissions on the eclipse
> directory, and it is OK.
You are looking in the workspace directory, correct?
>
> As regard the Error Log view, it doesn't say anything when I change
> the package presentation.
Again, I mentioned clearing the error log, shutting down, and looking
again when you've restarted.

I think at this point you have all the information you need because
there's nothing else I can tell you to try. Ensure that you're
really looking at the file for the workspace you're opening and
closing. Ensure that the file really changes when you shutdown. If it
doesn't try changing it manually to confirm that this setting really
does have an impact on what you see in the package explore. For me all
those things work as expected.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Package Presentation -&amp;amp;amp;gt; Hierarchical preference not saving [message #1726433 is a reply to message #1726429] Sun, 13 March 2016 14:07 Go to previous messageGo to next message
Flavio FB is currently offline Flavio FBFriend
Messages: 10
Registered: June 2015
Junior Member
Wait!

This time I've seen the value has changed to:

<item value="2" key="layout"/>

I tried to change that value to 1 before starting ecplise but nothing changes: still flat view.

I noticed only the following error as regard "ui":

eclipse.buildId=4.5.2.M20160212-1500
java.version=1.7.0_80
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

org.eclipse.egit.ui
Warning
Sun Mar 13 15:04:33 CET 2016
Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\fbcyborg'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.


I don't think that could cause the issue I am facing with.
Re: Package Presentation -&amp;amp;amp;amp;gt; Hierarchical preference not saving [message #1726437 is a reply to message #1726433] Sun, 13 March 2016 15:39 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31558
Registered: July 2009
Senior Member
I get the feeling you're telling me contradictory things. Sometimes the
value doesn't change, sometimes it does, sometimes it's changed when
you start, and always the value has no impact when you start. These
things aren't consistent.


On 13.03.2016 15:07, Flavio FB wrote:
> Wait!
>
> This time I've seen the value has changed to:
>
> <item value="2" key="layout"/>
>
> I tried to change that value to 1 before starting ecplise but nothing
> changes: still flat view.
>
> I noticed only the following error as regard "ui":
>
> eclipse.buildId=4.5.2.M20160212-1500
> java.version=1.7.0_80
> java.vendor=Oracle Corporation
> BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
> Framework arguments: -product org.eclipse.epp.package.jee.product
> Command-line arguments: -os win32 -ws win32 -arch x86_64 -product
> org.eclipse.epp.package.jee.product
>
> org.eclipse.egit.ui
> Warning
> Sun Mar 13 15:04:33 CET 2016
> Warning: The environment variable HOME is not set. The following
> directory will be used to store the Git
> user global configuration and to define the default location to store
> repositories: 'C:\Users\fbcyborg'. If this is
> not correct please set the HOME environment variable and restart
> Eclipse. Otherwise Git for Windows and
> EGit might behave differently since they see different configuration
> options.
> This warning can be switched off on the Team > Git > Confirmations and
> Warnings preference page.
>
> I don't think that could cause the issue I am facing with.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Package Presentation -&amp;amp;amp;amp;gt; Hierarchical preference not saving [message #1726442 is a reply to message #1726437] Sun, 13 March 2016 19:07 Go to previous messageGo to next message
Flavio FB is currently offline Flavio FBFriend
Messages: 10
Registered: June 2015
Junior Member
Hi,

yes, I understand your perplexity, I'm sorry for not being so precise.
Anyway, yes... this is my impression: the value has no impact when you start. I double checked the setting file being used (the one of the workspace I am using).
Today it was the first time I noticed that value changing, but it looks like it doesn't work.

These are the steps I am trying to reproduce:
1) Open .metadata\.plugins\org.eclipse.jdt.ui\dialog_settings.xml
2) check the following initial situation:
<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
    <...>
    <item value="1" key="layout"/>
    <...>
</section>

3) Open Eclipse
4) Package presentation is: Flat
5) Change Package presentation to: Hierarchical
6) <item value="1" key="layout"/> is unchanged
7) Close Eclipse
8 ) <item value="1" key="layout"/> is unchanged
9) Open Eclipse: value unchanged
10) Repeat step 6
11) Close Eclipse and the value is still unchanged

This is really weird... the value doesn't change anymore! The file is changing anyway when Eclipse is closed, but it's not related to the part we are talking about. Differences are just related to some piece of XML moved up or down.

Thanks for your support.

[Updated on: Sun, 13 March 2016 19:08]

Report message to a moderator

Re: Package Presentation -&amp;amp;amp;amp;amp;gt; Hierarchical preference not saving [message #1726460 is a reply to message #1726442] Mon, 14 March 2016 06:47 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31558
Registered: July 2009
Senior Member
Comments below.


On 13.03.2016 20:07, Flavio FB wrote:
> Hi,
> yes, I understand your perplexity, I'm sorry for not being so precise.
> Anyway, yes... this is my impression: the value has no impact when you
> start.
That's not what I see. This leads me to the impression that the file
you're looking at on disk is not really the workspace being used by Eclipse.
> I double checked the setting file being used (the one of the workspace
> I am using). Today it was the first time I noticed that value
> changing, but it looks like it doesn't work.
So you talk about the value changing, but the steps below describe them
not changing. That may be, but that means something during shutdown is
failing to save the change.

But then you also claim the value in the file has no impact when you
start up. I doubt that. Then there's also a problem reading the
file. If Eclipse can't read nor write the file, that suggests a
permissions problem.
>
> These are the steps I am trying to reproduce:
> 1) Open .metadata\.plugins\org.eclipse.jdt.ui\dialog_settings.xml
> 2) check the following initial situation:
> <section
> name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
> <...>
> <item value="1" key="layout"/>
> <...>
> </section>
> 3) Open Eclipse
> 4) Package presentation is: Flat
> 5) Change Package presentation to: Hierarchical
> 6) <item value="1" key="layout"/> is unchanged
> 7) Close Eclipse
> 8) <item value="1" key="layout"/> is unchanged
> 9) Open Eclipse: value unchanged
> 10) Repeat step 6
> 11) Close Eclipse and the value is still unchanged
>
> This is really weird... the value doesn't change anymore! The file is
> changing anyway when Eclipse is closed, but it's not related to the
> part we are talking about.
Of course the detail we've been talking about is some piece of XML.
> Differences are just related to some piece of XML moved up or down.
Try the following. Create a new workspace. Note where it is and make
sure that's the one Eclipse is opening. Try the experiment with that.
Copy the *.xml so you have a before and after version you can compare.
Try changing several things such as the top level between project and
workingset and the presentation between flat and hierarchical. Compare
the copied *.xml to see what's changing.
>
> Thanks for your support.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Package Presentation -&amp;amp;amp;amp;amp;gt; Hierarchical preference not saving [message #1726511 is a reply to message #1726460] Mon, 14 March 2016 11:34 Go to previous message
Flavio FB is currently offline Flavio FBFriend
Messages: 10
Registered: June 2015
Junior Member
OK,

Here's the XML file content that is created after the following steps:
1) open Eclipse
2) select a path for a new workspace
3) Switch to hierarchical package presentation
4) close eclipse

The file is being created when eclipse closes:
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
	<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
		<item value="true" key="group_libraries"/>
		<item value="false" key="linkWithEditor"/>
		<item value="1" key="layout"/>
		<item value="1" key="rootMode"/>
		<item value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0D;&#x0A;&lt;packageExplorer group_libraries=&quot;1&quot; layout=&quot;1&quot; linkWithEditor=&quot;0&quot; rootMode=&quot;1&quot; workingSetName=&quot;Aggregate for window 1457954723050&quot;&gt;&#x0D;&#x0A;&lt;customFilters userDefinedPatternsEnabled=&quot;false&quot;&gt;&#x0D;&#x0A;&lt;xmlDefinedFilters&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.ajdt.javamodel.CompilationUnitFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.ajdt.ui.editor.outline.PointcutFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.pde.ui.ExternalPluginLibrariesFilter1&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;_patternFilterId_*.ajsym&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_RemoteSystemsConnections&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.FieldsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.ajdt.ui.editor.outline.IntroductionFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.ajdt.ui.editor.outline.AdviceFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.pde.ui.BinaryProjectFilter1&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.mylyn.java.ui.MembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.StaticsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_*_Roo_*.aj&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.ajdt.ui.editor.outline.DeclarationFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_RemoteSystemsTempFiles&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0D;&#x0A;&lt;child filterId=&quot;org.eclipse.m2e.MavenModuleFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0D;&#x0A;&lt;/xmlDefinedFilters&gt;&#x0D;&#x0A;&lt;/customFilters&gt;&#x0D;&#x0A;&lt;/packageExplorer&gt;" key="memento"/>
	</section>
	<section name="JavaElementSearchActions">
	</section>
	<section name="NewPackageWizardPage">
		<item value="false" key="create_package_info_java"/>
	</section>
</section>


The value is set to 1 when it should be 2: <item value="1" key="layout"/>

Anyway, opening the workspace again the package presentation is Hierarchical as expected. I think there's no write permission problems on the other workspace, since the file is being modified every time.

This is really weird!
Previous Topic:Create standalone for Eclipse application.
Next Topic:toolbar buttons
Goto Forum:
  


Current Time: Thu Oct 29 12:00:41 GMT 2020

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

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

Back to the top