Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 248221 - [ds tooling] "Properties" section should save expansion state
Summary: [ds tooling] "Properties" section should save expansion state
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-22 20:52 EDT by Simon Archer CLA
Modified: 2008-09-30 21:53 EDT (History)
1 user (show)

See Also:


Attachments
Properties Section title updating (4.41 KB, text/plain)
2008-09-30 15:56 EDT, Rafael Oliveira Nóbrega CLA
caniszczyk: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Archer CLA 2008-09-22 20:52:16 EDT
Using Eclipse 3.5M2.

The "Properties" section of the Service Component editor should automatically be expanded when there is at lest one <property> or <properties> element.  Today it remains collapsed until manually expanded by the user.
Comment 1 Chris Aniszczyk CLA 2008-09-22 20:55:28 EDT
I'm not for automatic expansion here, how about just remembering the expansion state?
Comment 2 Simon Archer CLA 2008-09-22 21:09:07 EDT
Nah.  How about adding the number of property elements to the title of the section, so you can see without expanding if there are any?  So you'd get:

  Properties (4)

If there are 4 elements, and simply:

  Properties

When then are none.  I'd rather NOT see "Properties (0)".
Comment 3 Chris Aniszczyk CLA 2008-09-22 21:09:45 EDT
I like that, it's kind of "fancy pants" :)
Comment 4 Rafael Oliveira Nóbrega CLA 2008-09-30 15:56:20 EDT
Created attachment 113913 [details]
Properties Section title updating

Now we have the quantity-based title updating feature. :)

If we have no properties, the title will be: Properties
If we have 2 properties: Properties (2).

And so on... :)
Comment 5 Chris Aniszczyk CLA 2008-09-30 16:44:44 EDT
Thanks Rafael! This looks good!

I've opted to not save the state as we don't do this anywhere else in PDE.

I modified the patch to show Properties (0) too... instead of just Properties.

Thanks, this  is cool!
Comment 6 Chris Aniszczyk CLA 2008-09-30 16:45:04 EDT
fixed.

> 20090930
Comment 7 Simon Archer CLA 2008-09-30 21:50:11 EDT
While testing the tooling in a runtime workbench I found this in my console.  it sounds related to this bug, but I might be wrong.

Exception in thread "org.eclipse.jface.text.reconciler.MonoReconciler" org.eclipse.swt.SWTException: Invalid thread access
	at org.eclipse.swt.SWT.error(SWT.java:3777)
	at org.eclipse.swt.SWT.error(SWT.java:3695)
	at org.eclipse.swt.SWT.error(SWT.java:3666)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:463)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:355)
	at org.eclipse.swt.widgets.Table.getItemCount(Table.java:2360)
	at org.eclipse.pde.internal.ds.ui.editor.DSPropertiesSection.updateTitle(DSPropertiesSection.java:174)
	at org.eclipse.pde.internal.ds.ui.editor.DSPropertiesSection.modelChanged(DSPropertiesSection.java:451)
	at org.eclipse.pde.internal.core.text.AbstractEditingModel.fireModelChanged(AbstractEditingModel.java:229)
	at org.eclipse.pde.internal.core.text.AbstractEditingModel.reload(AbstractEditingModel.java:145)
	at org.eclipse.pde.internal.core.text.AbstractEditingModel.reconciled(AbstractEditingModel.java:170)
	at org.eclipse.pde.internal.ui.editor.text.ReconcilingStrategy.notifyParticipants(ReconcilingStrategy.java:53)
	at org.eclipse.pde.internal.ui.editor.text.ReconcilingStrategy.reconcile(ReconcilingStrategy.java:48)
	at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77)
	at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206)
Comment 8 Chris Aniszczyk CLA 2008-09-30 21:53:55 EDT
updated from HEAD.

I just fixed that one :)