[JBoss JIRA] (JBIDE-14325) Remove UI dependencies from o.j.t.common.core
by Rob Stryker (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14325?page=com.atlassian.jira.plugi... ]
Rob Stryker commented on JBIDE-14325:
-------------------------------------
If anyone feels this change requires a full version bump, I will do it, but I think it may not be 100% necessary in this specific case. Again, up for debate.
> Remove UI dependencies from o.j.t.common.core
> ---------------------------------------------
>
> Key: JBIDE-14325
> URL: https://issues.jboss.org/browse/JBIDE-14325
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: common/jst/core
> Affects Versions: 4.1.0.Alpha2
> Reporter: Rob Stryker
> Assignee: Rob Stryker
> Priority: Critical
> Fix For: 4.1.0.Beta1
>
>
> One class is polluting o.j.t.common.core with a guaranteed UI class reference. The class in question is org.jboss.tools.common.text.TextProposal. This class should not be in a core plugin at all.
> This class USED to live in org.jboss.tools.common, but was mistakenly moved to org.jboss.tools.common.core. The package name was NOT changed, so consumers of this class almost 100% did not change their dependencies or depend on teh new LOCATION at all.
> Moving this class *BACK* to where it was before, while technically an API change, is almost assuredly very very low risk. There is a danger that *NEW* consumers have appeared, and that risk should be considered, but not exaggerated.
> One other class depends on two jeetools packages which are very large and have a sprawling dependency list. I can not say with certainty whether any UI is pulled in via this reference, but, i feel it is safest to remove it if it can be done in a safe manner.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] (JBIDE-14325) Remove UI dependencies from o.j.t.common.core
by Rob Stryker (JIRA)
Rob Stryker created JBIDE-14325:
-----------------------------------
Summary: Remove UI dependencies from o.j.t.common.core
Key: JBIDE-14325
URL: https://issues.jboss.org/browse/JBIDE-14325
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: common/jst/core
Affects Versions: 4.1.0.Alpha2
Reporter: Rob Stryker
Assignee: Rob Stryker
Priority: Critical
Fix For: 4.1.0.Beta1
One class is polluting o.j.t.common.core with a guaranteed UI class reference. The class in question is org.jboss.tools.common.text.TextProposal. This class should not be in a core plugin at all.
This class USED to live in org.jboss.tools.common, but was mistakenly moved to org.jboss.tools.common.core. The package name was NOT changed, so consumers of this class almost 100% did not change their dependencies or depend on teh new LOCATION at all.
Moving this class *BACK* to where it was before, while technically an API change, is almost assuredly very very low risk. There is a danger that *NEW* consumers have appeared, and that risk should be considered, but not exaggerated.
One other class depends on two jeetools packages which are very large and have a sprawling dependency list. I can not say with certainty whether any UI is pulled in via this reference, but, i feel it is safest to remove it if it can be done in a safe manner.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] (JBIDE-14320) JSPMultiPageEditor.getDocumentProvider().getDocument(input) returns null
by Yahor Radtsevich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14320?page=com.atlassian.jira.plugi... ]
Yahor Radtsevich edited comment on JBIDE-14320 at 4/26/13 12:00 PM:
--------------------------------------------------------------------
Together with [~vrubezhny] we just found another workaround with no dependencies to {{JSPMultiPageEditor}}:
{code}
IDocument doc = null;
ITextEditor textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
if (textEditor == null && editor instanceof ITextEditor) {
textEditor = (ITextEditor) editor;
}
if (textEditor != null) {
doc = textEditor.getDocumentProvider().getDocument(input);
if (doc == null) {
doc = (IDocument) textEditor.getAdapter(IDocument.class);
}
}
{code}
was (Author: yradtsevich):
Together with [~vrubezhny] we just found another workaround with no dependencies to {{JSPMultiPageEditor}}:
{code}
IDocument doc = null;
ITextEditor textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
if (textEditor == null && editor instanceof ITextEditor) {
textEditor = (ITextEditor) editor;
}
if (textEditor != null) {
doc = textEditor.getDocumentProvider().getDocument(input);
if (doc == null) {
doc = (IDocument) textEditor.getAdapter(IDocument.class);
}
}
if (doc != null) {
doc.set(content);
editor.doSave(null); // reset resource-changed marker
}
{code}
> JSPMultiPageEditor.getDocumentProvider().getDocument(input) returns null
> ------------------------------------------------------------------------
>
> Key: JBIDE-14320
> URL: https://issues.jboss.org/browse/JBIDE-14320
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: browsersim, jsp/jsf/xml/html source editing
> Affects Versions: 4.1.0.Beta1
> Reporter: Yahor Radtsevich
> Assignee: Victor Rubezhny
> Fix For: 4.1.0.Beta1
>
>
> In BrowserSim we [use|https://github.com/jbosstools/jbosstools-vpe/blob/master/plugins/org....] the following code to view the source code of currently opened page.
> This code opens a default html editor with given {{content}}.
> Everything is working fine, unless {{JSPMultiPageEditor}} is the default html editor.
> In the case with {{JSPMultiPageEditor}}, the method {{JSPMultiPageEditor.getDocumentProvider().getDocument(input)}} returns {{null}} and blanck editor is shown.
> {code}
> private void openInMemoryHtmlEditor(String content, String name, String toolTip) {
> IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
> IWorkbenchPage page = window != null ? window.getActivePage() : null;
> if (page != null) {
> try {
> IEditorDescriptor editorDescriptor = PlatformUI.getWorkbench()
> .getEditorRegistry().getDefaultEditor("view-source.html"); // get default editor for .html //$NON-NLS-1$
> String editorId;
> if (editorDescriptor != null && editorDescriptor.isInternal()) {
> editorId = editorDescriptor.getId();
> } else {
> editorId = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
> }
> IStorage storage = new StringStorage("", // see the long comment below to know why an empty storage is created //$NON-NLS-1$
> "view-source.html"); // .html extension is needed to enable code highlighting in the WTP HTML editor //$NON-NLS-1$
> IStorageEditorInput input = new StringInput(storage, name, toolTip);
> IEditorPart editor = page.openEditor(input, editorId);
>
> /* We change content of the editor AFTER the editor is created
> * as a workaround for the following WTP bug.
> * The essence of the bug is that if given HTML page contains a link
> * to an external DTD, then WTP HTML editor tries to access this DTD before the editor
> * is created and freezes UI.
> * See http://www.eclipse.org/forums/index.php/m/639937/
> */
> IDocument doc = null;
> ITextEditor textEditor = null;
> if (editor instanceof ITextEditor) {
> textEditor = (ITextEditor) editor;
> } else {
> textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
> }
>
> if (textEditor != null) {
> doc = textEditor.getDocumentProvider().getDocument(input);// <<<<----- THE PROBLEM APPEARS HERE
> }
> if (doc != null) {
> doc.set(content);
> editor.doSave(null); // reset resource-changed marker
> }
> } catch (PartInitException e) {
> Activator.logError(e.getMessage(), e);
> }
> } else {
> Activator.logError("Cannot obtain workbench page", null);
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] (JBIDE-14320) JSPMultiPageEditor.getDocumentProvider().getDocument(input) returns null
by Yahor Radtsevich (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14320?page=com.atlassian.jira.plugi... ]
Yahor Radtsevich commented on JBIDE-14320:
------------------------------------------
Together with [~vrubezhny] we just found another workaround with no dependencies to {{JSPMultiPageEditor}}:
{code}
IDocument doc = null;
ITextEditor textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
if (textEditor == null && editor instanceof ITextEditor) {
textEditor = (ITextEditor) editor;
}
if (textEditor != null) {
doc = textEditor.getDocumentProvider().getDocument(input);
if (doc == null) {
doc = (IDocument) textEditor.getAdapter(IDocument.class);
}
}
if (doc != null) {
doc.set(content);
editor.doSave(null); // reset resource-changed marker
}
{code}
> JSPMultiPageEditor.getDocumentProvider().getDocument(input) returns null
> ------------------------------------------------------------------------
>
> Key: JBIDE-14320
> URL: https://issues.jboss.org/browse/JBIDE-14320
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: browsersim, jsp/jsf/xml/html source editing
> Affects Versions: 4.1.0.Beta1
> Reporter: Yahor Radtsevich
> Assignee: Victor Rubezhny
> Fix For: 4.1.0.Beta1
>
>
> In BrowserSim we [use|https://github.com/jbosstools/jbosstools-vpe/blob/master/plugins/org....] the following code to view the source code of currently opened page.
> This code opens a default html editor with given {{content}}.
> Everything is working fine, unless {{JSPMultiPageEditor}} is the default html editor.
> In the case with {{JSPMultiPageEditor}}, the method {{JSPMultiPageEditor.getDocumentProvider().getDocument(input)}} returns {{null}} and blanck editor is shown.
> {code}
> private void openInMemoryHtmlEditor(String content, String name, String toolTip) {
> IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
> IWorkbenchPage page = window != null ? window.getActivePage() : null;
> if (page != null) {
> try {
> IEditorDescriptor editorDescriptor = PlatformUI.getWorkbench()
> .getEditorRegistry().getDefaultEditor("view-source.html"); // get default editor for .html //$NON-NLS-1$
> String editorId;
> if (editorDescriptor != null && editorDescriptor.isInternal()) {
> editorId = editorDescriptor.getId();
> } else {
> editorId = "org.eclipse.ui.DefaultTextEditor"; //$NON-NLS-1$
> }
> IStorage storage = new StringStorage("", // see the long comment below to know why an empty storage is created //$NON-NLS-1$
> "view-source.html"); // .html extension is needed to enable code highlighting in the WTP HTML editor //$NON-NLS-1$
> IStorageEditorInput input = new StringInput(storage, name, toolTip);
> IEditorPart editor = page.openEditor(input, editorId);
>
> /* We change content of the editor AFTER the editor is created
> * as a workaround for the following WTP bug.
> * The essence of the bug is that if given HTML page contains a link
> * to an external DTD, then WTP HTML editor tries to access this DTD before the editor
> * is created and freezes UI.
> * See http://www.eclipse.org/forums/index.php/m/639937/
> */
> IDocument doc = null;
> ITextEditor textEditor = null;
> if (editor instanceof ITextEditor) {
> textEditor = (ITextEditor) editor;
> } else {
> textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
> }
>
> if (textEditor != null) {
> doc = textEditor.getDocumentProvider().getDocument(input);// <<<<----- THE PROBLEM APPEARS HERE
> }
> if (doc != null) {
> doc.set(content);
> editor.doSave(null); // reset resource-changed marker
> }
> } catch (PartInitException e) {
> Activator.logError(e.getMessage(), e);
> }
> } else {
> Activator.logError("Cannot obtain workbench page", null);
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] (JBIDE-14319) CordovaSim: Aerogear default project isn't emulated by CordovaSim
by Ilya Buziuk (JIRA)
[ https://issues.jboss.org/browse/JBIDE-14319?page=com.atlassian.jira.plugi... ]
Ilya Buziuk commented on JBIDE-14319:
-------------------------------------
hi, [~gercan], actually, CordovaSim and Ripple by design don't add/replace own cordova.js - they use it from the project. As far as I'm concerned, all examples from phonegap archives have cordova.js links. However, we can host cordova.js with jetty, but it's a tricky business indeed.
- if we host cordova.js via jetty, we'll change ripple design
- what version / versions of codova.js should be hosted?
- what if user will try to emulate *not* a hybrid project (for instance, Dynamic Web Project) via CordovaSim - cordova.js would be added anyway
What is more, in most cases CordovaSim doesn't care about cordova.js origins (ios/android) - I tried to add in Aerogear Hybrid Application Project both cordova-2.6.0.js and cordova.ios.js - works the same.
> CordovaSim: Aerogear default project isn't emulated by CordovaSim
> -----------------------------------------------------------------
>
> Key: JBIDE-14319
> URL: https://issues.jboss.org/browse/JBIDE-14319
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: aerogear-hybrid, browsersim
> Reporter: Ilya Buziuk
> Assignee: Gorkem Ercan
> Fix For: 4.1.0.Beta1
>
>
> The root of the issue is pretty obvious - there is no cordova.js file in the aerogear project, which is vital for CordovaSim.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years
[JBoss JIRA] (JBIDE-13021) Connection dialog: settings are to default when switching to <New Connection> but checkbox is not checked and password is erroneous
by Andre Dietisheim (JIRA)
[ https://issues.jboss.org/browse/JBIDE-13021?page=com.atlassian.jira.plugi... ]
Andre Dietisheim updated JBIDE-13021:
-------------------------------------
Steps to Reproduce:
1.) ASSERT: make sure you have at least 1 valid account in OpenShift Explorer that's using a non-default server (ex. stg.openshift.redhat.com)
2.) EXEC: Select your account in OpenShift Explorer and hit *Connect to OpenShift*
3.) ASSERT: upcoming dialog has *Connection* combo set to your account
!existing-account.png!
4.) EXEC: switch the combo to *<New Connection>*
Result:
!new-account.png!
The username and server are both resetted to the default values from the preferences (and openshift configurations). Even though the server is set to the default server, the default server checkbox is not checked. The password is erroneous: if you simply hit finish you'll have the connection dialog telling you that the credentials are wrong. If you correct the password the connection will succeed.
Expected result:
*Use default* checkbox should get checked, the password should get filled in correctly or resetted.
Another interesting alternative would be to use the settings from the user that was previously selected and just clear the password. This would allow users to easily reuse users on different servers.
was:
# ASSERT: make sure you have at least 1 valid account in OpenShift Explorer that's using a non-default server (ex. stg.openshift.redhat.com)
# EXEC: Select your account in OpenShift Explorer and hit *Connect to OpenShift*
# ASSERT: upcoming dialog has *Connection* combo set to your account
!existing-account.png!
# EXEC: switch the combo to *<New Connection>*
Result:
!new-account.png!
The username and server are both resetted to the default values from the preferences (and openshift configurations). Even though the server is set to the default server, the default server checkbox is not checked. The password is erroneous: if you simply hit finish you'll have the connection dialog telling you that the credentials are wrong. If you correct the password the connection will succeed.
Expected result:
*Use default* checkbox should get checked, the password should get filled in correctly or resetted.
Another interesting alternative would be to use the settings from the user that was previously selected and just clear the password. This would allow users to easily reuse users on different servers.
> Connection dialog: settings are to default when switching to <New Connection> but checkbox is not checked and password is erroneous
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBIDE-13021
> URL: https://issues.jboss.org/browse/JBIDE-13021
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.0.0.Beta1
> Reporter: Andre Dietisheim
> Assignee: Andre Dietisheim
> Priority: Minor
> Fix For: 4.1.x
>
> Attachments: existing-account.png, new-account.png
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years