[JBoss JIRA] (JBIDE-21755) "Eager-er" loading of the project properties
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21755?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich edited comment on JBIDE-21755 at 2/25/16 9:46 PM:
------------------------------------------------------------------------
I have a simple solution for 'autoloading' which may have side effects, so that I put it here as snippet, not a PR:
Replace method inputChanged() in org.jboss.tools.openshift.internal.common.ui.explorer.BaseExplorerContentProvider with this code:
{code}
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if(this.viewer != null) {
this.viewer.removeSelectionChangedListener(selectionListener);
}
this.viewer = (TreeViewer) viewer;
if(this.viewer != null) {
this.viewer.addSelectionChangedListener(selectionListener);
}
if(input != null && connectionListener != null) {
input.removeListener(connectionListener);
}
if(newInput instanceof ConnectionsRegistry) {
input = (ConnectionsRegistry) newInput;
if(connectionListener != null) {
input.addListener(connectionListener);
}
}
}
SelectionListener selectionListener = new SelectionListener();
class SelectionListener implements ISelectionChangedListener {
@Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection s = event.getSelection();
if(!s.isEmpty() && s instanceof IStructuredSelection) {
IStructuredSelection st = (IStructuredSelection)s;
final Object o = st.getFirstElement();
if(o instanceof IConnection) {
return;
}
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
TreeViewer v = BaseExplorerContentProvider.this.viewer;
if(v != null && v.getControl() != null && !v.getControl().isDisposed()) {
boolean b = v.getExpandedState(o);
if(!b) {
v.setExpandedState(o, true);
v.setExpandedState(o, false);
}
}
}
});
}
}
}
{code}
The idea is to flip expansion to true and back to false for a selected node, which causes loading. SWT Tree is nice to make it unnoticed for user, but of course loading resources job appears in progress.
The code takes care not to flip expansion on IConnection node, because if it is not connected yet that triggers Sign In dialog, and then there are two of them. But when user clicks on children of connection it means that it is connected (is it always true?) and just normal resource loading happens. Flip is called only if node is not expanded. Probably we can also analyse if tree has children loaded before, then flip is also not needed.
[~xcoulon], could you please try this code? It may not be enough to update Properties view, because it already processed selection event and needs some kick after the flip.
was (Author: scabanovich):
I have a simple solution for 'autoloading' which may have side effects, so that I put it here as snippet, not a PR:
Replace method inputChanged() in org.jboss.tools.openshift.internal.common.ui.explorer.BaseExplorerContentProvider with this code:
{code}
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if(this.viewer != null) {
this.viewer.removeSelectionChangedListener(selectionListener);
}
this.viewer = (TreeViewer) viewer;
if(this.viewer != null) {
this.viewer.addSelectionChangedListener(selectionListener);
}
if(input != null && connectionListener != null) {
input.removeListener(connectionListener);
}
if(newInput instanceof ConnectionsRegistry) {
input = (ConnectionsRegistry) newInput;
if(connectionListener != null) {
input.addListener(connectionListener);
}
}
}
SelectionListener selectionListener = new SelectionListener();
class SelectionListener implements ISelectionChangedListener {
@Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection s = event.getSelection();
if(!s.isEmpty() && s instanceof IStructuredSelection) {
IStructuredSelection st = (IStructuredSelection)s;
final Object o = st.getFirstElement();
if(o instanceof IConnection) {
return;
}
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
TreeViewer v = BaseExplorerContentProvider.this.viewer;
if(v != null && v.getControl() != null && !v.getControl().isDisposed()) {
boolean b = v.getExpandedState(o);
if(!b) {
v.setExpandedState(o, true);
v.setExpandedState(o, false);
}
}
}
});
}
}
}
{code}
The idea is to flip expansion to true and back to false for a selected node, which causes loading. SWT Tree is nice to make it unnoticed for user, but of course loading resources job appears in progress.
The code takes care not to flip expansion on IConnection node, because if it is not connected yet that triggers Sign In dialog, and then there are two of them. But when user clicks on children of connection it means that it is connected (is it always true?) and just normal resource loading happens. Flip is called only if node is not expanded. Probably we can also analyse if tree has children loaded before, then flip is also not needed.
> "Eager-er" loading of the project properties
> --------------------------------------------
>
> Key: JBIDE-21755
> URL: https://issues.jboss.org/browse/JBIDE-21755
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: openshift
> Affects Versions: 4.3.1.Beta2
> Reporter: Xavier Coulon
>
> Once I logged in the OpenShift Explorer, if I expand the connection and select my project, all tables on the tabbed properties view are empty. I need to expand the project in the OpenShift Explorer view to trigger a loading which then allows for displaying the data in the properties view. This is somehow confusing because the user may think that the OpenShift project is empty.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (JBIDE-21755) "Eager-er" loading of the project properties
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21755?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich edited comment on JBIDE-21755 at 2/25/16 9:43 PM:
------------------------------------------------------------------------
I have a simple solution for 'autoloading' which may have side effects, so that I put it here as snippet, not a PR:
Replace method inputChanged() in org.jboss.tools.openshift.internal.common.ui.explorer.BaseExplorerContentProvider with this code:
{code}
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if(this.viewer != null) {
this.viewer.removeSelectionChangedListener(selectionListener);
}
this.viewer = (TreeViewer) viewer;
if(this.viewer != null) {
this.viewer.addSelectionChangedListener(selectionListener);
}
if(input != null && connectionListener != null) {
input.removeListener(connectionListener);
}
if(newInput instanceof ConnectionsRegistry) {
input = (ConnectionsRegistry) newInput;
if(connectionListener != null) {
input.addListener(connectionListener);
}
}
}
SelectionListener selectionListener = new SelectionListener();
class SelectionListener implements ISelectionChangedListener {
@Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection s = event.getSelection();
if(!s.isEmpty() && s instanceof IStructuredSelection) {
IStructuredSelection st = (IStructuredSelection)s;
final Object o = st.getFirstElement();
if(o instanceof IConnection) {
return;
}
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
TreeViewer v = BaseExplorerContentProvider.this.viewer;
if(v != null && v.getControl() != null && !v.getControl().isDisposed()) {
boolean b = v.getExpandedState(o);
if(!b) {
v.setExpandedState(o, true);
v.setExpandedState(o, false);
}
}
}
});
}
}
}
{code}
The idea is to flip expansion to true and back to false for a selected node, which causes loading. SWT Tree is nice to make it unnoticed for user, but of course loading resources job appears in progress.
The code takes care not to flip expansion on IConnection node, because if it is not connected yet that triggers Sign In dialog, and then there are two of them. But when user clicks on children of connection it means that it is connected (is it always true?) and just normal resource loading happens. Flip is called only if node is not expanded. Probably we can also analyse if tree has children loaded before, then flip is also not needed.
was (Author: scabanovich):
I have a simple solution for 'autoloading' which may have side effects, so that I put it here as snippet, not a PR:
Replace method inputChanged() in org.jboss.tools.openshift.internal.common.ui.explorer.BaseExplorerContentProvider with this code:
{code}
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if(this.viewer != null) {
this.viewer.removeSelectionChangedListener(selectionListener);
}
this.viewer = (TreeViewer) viewer;
if(this.viewer != null) {
this.viewer.addSelectionChangedListener(selectionListener);
}
if(input != null && connectionListener != null) {
input.removeListener(connectionListener);
}
if(newInput instanceof ConnectionsRegistry) {
input = (ConnectionsRegistry) newInput;
if(connectionListener != null) {
input.addListener(connectionListener);
}
}
}
SelectionListener selectionListener = new SelectionListener();
class SelectionListener implements ISelectionChangedListener {
@Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection s = event.getSelection();
if(!s.isEmpty() && s instanceof IStructuredSelection) {
IStructuredSelection st = (IStructuredSelection)s;
final Object o = st.getFirstElement();
if(o instanceof IConnection) {
return;
}
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
TreeViewer v = BaseExplorerContentProvider.this.viewer;
if(v != null && v.getControl() != null && !v.getControl().isDisposed()) {
boolean b = v.getExpandedState(o);
if(!b) {
v.setExpandedState(o, true);
v.setExpandedState(o, false);
}
}
}
});
}
}
}
{code}
> "Eager-er" loading of the project properties
> --------------------------------------------
>
> Key: JBIDE-21755
> URL: https://issues.jboss.org/browse/JBIDE-21755
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: openshift
> Affects Versions: 4.3.1.Beta2
> Reporter: Xavier Coulon
>
> Once I logged in the OpenShift Explorer, if I expand the connection and select my project, all tables on the tabbed properties view are empty. I need to expand the project in the OpenShift Explorer view to trigger a loading which then allows for displaying the data in the properties view. This is somehow confusing because the user may think that the OpenShift project is empty.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (JBIDE-21755) "Eager-er" loading of the project properties
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21755?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich commented on JBIDE-21755:
-----------------------------------------------
I have a simple solution for 'autoloading' which may have side effects, so that I put it here as snippet, not a PR:
Replace method inputChanged() in org.jboss.tools.openshift.internal.common.ui.explorer.BaseExplorerContentProvider with this code:
{code}
@Override
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
if(this.viewer != null) {
this.viewer.removeSelectionChangedListener(selectionListener);
}
this.viewer = (TreeViewer) viewer;
if(this.viewer != null) {
this.viewer.addSelectionChangedListener(selectionListener);
}
if(input != null && connectionListener != null) {
input.removeListener(connectionListener);
}
if(newInput instanceof ConnectionsRegistry) {
input = (ConnectionsRegistry) newInput;
if(connectionListener != null) {
input.addListener(connectionListener);
}
}
}
SelectionListener selectionListener = new SelectionListener();
class SelectionListener implements ISelectionChangedListener {
@Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection s = event.getSelection();
if(!s.isEmpty() && s instanceof IStructuredSelection) {
IStructuredSelection st = (IStructuredSelection)s;
final Object o = st.getFirstElement();
if(o instanceof IConnection) {
return;
}
Display.getDefault().asyncExec(new Runnable() {
@Override
public void run() {
TreeViewer v = BaseExplorerContentProvider.this.viewer;
if(v != null && v.getControl() != null && !v.getControl().isDisposed()) {
boolean b = v.getExpandedState(o);
if(!b) {
v.setExpandedState(o, true);
v.setExpandedState(o, false);
}
}
}
});
}
}
}
{code}
> "Eager-er" loading of the project properties
> --------------------------------------------
>
> Key: JBIDE-21755
> URL: https://issues.jboss.org/browse/JBIDE-21755
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: openshift
> Affects Versions: 4.3.1.Beta2
> Reporter: Xavier Coulon
>
> Once I logged in the OpenShift Explorer, if I expand the connection and select my project, all tables on the tabbed properties view are empty. I need to expand the project in the OpenShift Explorer view to trigger a loading which then allows for displaying the data in the properties view. This is somehow confusing because the user may think that the OpenShift project is empty.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (JBIDE-21732) Server Adapter: Improve routing selection group in New OpenShift Server adapter wizard
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21732?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich edited comment on JBIDE-21732 at 2/25/16 8:47 PM:
------------------------------------------------------------------------
Following XChat discussion, pull request is updated according to screenshots with "Advanced >>" button.
In Eclipse Project input, combo is replaced with text widget with content assist and validation. See screenshots.
was (Author: scabanovich):
Following XChat discussion, pull request is updated according to screenshots with "Advanced >>" button.
In Eclipse Project input, combo is replaced with text widget with content assist and validation.
> Server Adapter: Improve routing selection group in New OpenShift Server adapter wizard
> --------------------------------------------------------------------------------------
>
> Key: JBIDE-21732
> URL: https://issues.jboss.org/browse/JBIDE-21732
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: openshift
> Affects Versions: 4.3.1.CR1
> Reporter: Marián Labuda
> Labels: openshift_v3, server_adapter
> Attachments: default_route_os3.gliffy, EnhancedRouteGroup.png, NewServer_Advanced.png, NewServer_Advanced_Expanded.png, use-default-git-clone-destination.png
>
>
> Currently there is a group called "Default Route" and there is a selection of a routing and checkbox for it. See attached diagram for proposed layout.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (JBIDE-21732) Server Adapter: Improve routing selection group in New OpenShift Server adapter wizard
by Viacheslav Kabanovich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21732?page=com.atlassian.jira.plugi... ]
Viacheslav Kabanovich updated JBIDE-21732:
------------------------------------------
Attachment: NewServer_Advanced_Expanded.png
NewServer_Advanced.png
> Server Adapter: Improve routing selection group in New OpenShift Server adapter wizard
> --------------------------------------------------------------------------------------
>
> Key: JBIDE-21732
> URL: https://issues.jboss.org/browse/JBIDE-21732
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: openshift
> Affects Versions: 4.3.1.CR1
> Reporter: Marián Labuda
> Labels: openshift_v3, server_adapter
> Attachments: default_route_os3.gliffy, EnhancedRouteGroup.png, NewServer_Advanced.png, NewServer_Advanced_Expanded.png, use-default-git-clone-destination.png
>
>
> Currently there is a group called "Default Route" and there is a selection of a routing and checkbox for it. See attached diagram for proposed layout.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month
[JBoss JIRA] (JBDS-3602) Error Reporting doesnt work since we do not set eclipse.buildid
by Alexey Kazakov (JIRA)
[ https://issues.jboss.org/browse/JBDS-3602?page=com.atlassian.jira.plugin.... ]
Alexey Kazakov resolved JBDS-3602.
----------------------------------
Resolution: Done
Looks good. Merged.
> Error Reporting doesnt work since we do not set eclipse.buildid
> ---------------------------------------------------------------
>
> Key: JBDS-3602
> URL: https://issues.jboss.org/browse/JBDS-3602
> Project: Developer Studio (JBoss Developer Studio)
> Issue Type: Bug
> Components: aeri
> Affects Versions: 9.1.0.CR1
> Environment: JBDS 9.1.0.CR1-v20160222-0232-B335
> JBT Nightly (2016-02-22)
> both contains the same version of aeri plugins
> Reporter: Rastislav Wagner
> Assignee: Denis Golovin
> Priority: Blocker
> Fix For: 9.1.0.CR1
>
>
> So I tied to evoke error reporting dialog with the following scenario:
> 1. import Java EE Web Project from central
> 2. right click in Project Explorer -> refactor -> rename
> 3. change name, hit OK which will result in errors from org.hibernate stuff
> In case of JBDS no error reporting dialog is shown, works in JBT
> I also tried org.eclipse stuff:
> 1. open Properties view
> 2. create JPA Project (File -> New -> Other... JPA Project)
> 3. open persistence.xml which will result in NPE from org.eclipse stuff
> And again in no error reporting dialog in case of JBDS but works in JBT
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
10 years, 1 month