-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update fields #22
Merged
Merged
Update fields #22
Changes from 36 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
4246edd
For Vlad, good luck!
100cc00
Correcting github org links to Micro Focus
b624378
Made some fields look editable in UI
f755459
Merge branch 'update-fields' of github.com:HPSoftware/octane-eclipse-…
e22acd3
Refactoring editor
e185dad
Major refactor for entity details view
d64dcd6
Merge branch 'update-fields' of
23dfc51
Made UI composites look like they are supposed to
d5cea57
Made phase combo box work as intended
66f4aae
Fixing phase resize issue
ec5907e
Made buttons appear even if entity has no phase
c84edf2
Vlad work in progress for fields composite
3bc1c4b
UI fields taking shape, refresh button working, buttons appearing
e661688
Made UI look better, added field display selector working(must click
163f29e
Refactoring the dropdown so it can handle clearing all options and
09cbd39
Fields selector works as intended
9672968
Fixed bug where description wouldn't expand properly after refresh
05be866
Made save button work for phases and some small code re-arrange
ca01dba
Fixed bug where Fields button wouldn't refresh after making a change to
9ee74da
merging master into update-fields
0323c1b
Added an error message when the user cannot open an entity (also related
709a2a7
Deactivated save button in case there's no transition for phase
7dfa368
Made save button more user friendly when there's no phase to be selected
b9f069a
Updated visible fields in an entityView to match those in octane
9b1e881
Fields button do not show fields that shouldn't appear
76bd674
Phase combo won't blow up when no transition is available
27ef4aa
Added visual separator to comments
72bc0b6
Added comment toggle button
9e2b72e
Comments section now collapses like in Octane and fixed problem with
68dcf74
Added copyrights to files that didn't have
eaf38f7
Merging master into update-fields
902c0f1
rererererererere factor!
117d044
Merge branch 'update-fields' of git@github.com:HPSoftware/octane-ecli…
87d2baa
format code and fixed bug for comments button where it'd show even it
e01ae06
Formatting code and re-adding code that Andras deleted :):):)
28f6d30
indentation / formatting code
9492839
Renaming packages, yay!
4d9e38b
Merging
ab67590
Solving pull requests changes
9ca846f
merging
fc5cce9
Solving pull requests changes
b8be10d
fixed defect where it wouldn't properly open an entity
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,8 +69,8 @@ | |
point="org.eclipse.ui.editors"> | ||
<editor | ||
class="com.hpe.octane.ideplugins.eclipse.ui.editor.EntityModelEditor" | ||
id="com.hpe.octane.ideplugins.eclipse.ui.EntityModelEditor" | ||
name="EntityModelEditor"> | ||
id="com.hpe.octane.ideplugins.eclipse.ui.editor2.EntityModelEditorNew" | ||
name="EntityModelEditorNew"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. naming |
||
</editor> | ||
<editor | ||
class="com.hpe.octane.ideplugins.eclipse.ui.search.SearchEditor" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
134 changes: 67 additions & 67 deletions
134
octane-eclipse-plugin/src/com/hpe/octane/ideplugins/eclipse/commands/CallEditor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,67 @@ | ||
/******************************************************************************* | ||
* © 2017 EntIT Software LLC, a Micro Focus company, L.P. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
******************************************************************************/ | ||
package com.hpe.octane.ideplugins.eclipse.commands; | ||
import org.eclipse.core.commands.AbstractHandler; | ||
import org.eclipse.core.commands.ExecutionEvent; | ||
import org.eclipse.core.commands.ExecutionException; | ||
import org.eclipse.core.runtime.ILog; | ||
import org.eclipse.core.runtime.Status; | ||
import org.eclipse.jface.viewers.ISelection; | ||
import org.eclipse.jface.viewers.IStructuredSelection; | ||
import org.eclipse.ui.IWorkbenchPage; | ||
import org.eclipse.ui.IWorkbenchWindow; | ||
import org.eclipse.ui.PartInitException; | ||
import org.eclipse.ui.handlers.HandlerUtil; | ||
import com.hpe.adm.nga.sdk.model.EntityModel; | ||
import com.hpe.adm.octane.ideplugins.services.filtering.Entity; | ||
import com.hpe.adm.octane.ideplugins.services.mywork.MyWorkUtil; | ||
import com.hpe.octane.ideplugins.eclipse.Activator; | ||
import com.hpe.octane.ideplugins.eclipse.ui.editor.EntityModelEditor; | ||
import com.hpe.octane.ideplugins.eclipse.ui.editor.EntityModelEditorInput; | ||
public class CallEditor extends AbstractHandler { | ||
ILog logger = Activator.getDefault().getLog(); | ||
@Override | ||
public Object execute(ExecutionEvent event) throws ExecutionException { | ||
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event); | ||
IWorkbenchPage page = window.getActivePage(); | ||
ISelection selection = HandlerUtil.getCurrentSelection(event); | ||
if (selection != null && selection instanceof IStructuredSelection) { | ||
Object obj = ((IStructuredSelection) selection).getFirstElement(); | ||
if (obj != null) { | ||
EntityModel entityModel = (EntityModel) obj; | ||
if(Entity.USER_ITEM == Entity.getEntityType(entityModel)){ | ||
entityModel = MyWorkUtil.getEntityModelFromUserItem(entityModel); | ||
} | ||
Long id = Long.parseLong(entityModel.getValue("id").getValue().toString()); | ||
EntityModelEditorInput entityModelEditorInput = new EntityModelEditorInput(id, Entity.getEntityType(entityModel)); | ||
try { | ||
logger.log(new Status(Status.INFO, Activator.PLUGIN_ID, Status.OK, entityModelEditorInput.toString(), null)); | ||
page.openEditor(entityModelEditorInput, EntityModelEditor.ID); | ||
} catch (PartInitException e) { | ||
logger.log(new Status(Status.ERROR, Activator.PLUGIN_ID, Status.ERROR, "An exception has occured when opening the editor", e)); | ||
} | ||
} | ||
} | ||
return null; | ||
} | ||
} | ||
/******************************************************************************* | ||
* © 2017 EntIT Software LLC, a Micro Focus company, L.P. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
******************************************************************************/ | ||
package com.hpe.octane.ideplugins.eclipse.commands; | ||
|
||
import org.eclipse.core.commands.AbstractHandler; | ||
import org.eclipse.core.commands.ExecutionEvent; | ||
import org.eclipse.core.commands.ExecutionException; | ||
import org.eclipse.core.runtime.ILog; | ||
import org.eclipse.core.runtime.Status; | ||
import org.eclipse.jface.viewers.ISelection; | ||
import org.eclipse.jface.viewers.IStructuredSelection; | ||
import org.eclipse.ui.IWorkbenchPage; | ||
import org.eclipse.ui.IWorkbenchWindow; | ||
import org.eclipse.ui.PartInitException; | ||
import org.eclipse.ui.handlers.HandlerUtil; | ||
|
||
import com.hpe.adm.nga.sdk.model.EntityModel; | ||
import com.hpe.adm.octane.ideplugins.services.filtering.Entity; | ||
import com.hpe.adm.octane.ideplugins.services.mywork.MyWorkUtil; | ||
import com.hpe.octane.ideplugins.eclipse.Activator; | ||
import com.hpe.octane.ideplugins.eclipse.ui.editor.EntityModelEditor; | ||
import com.hpe.octane.ideplugins.eclipse.ui.editor.EntityModelEditorInput; | ||
|
||
public class CallEditor extends AbstractHandler { | ||
|
||
ILog logger = Activator.getDefault().getLog(); | ||
|
||
@Override | ||
public Object execute(ExecutionEvent event) throws ExecutionException { | ||
|
||
IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event); | ||
IWorkbenchPage page = window.getActivePage(); | ||
ISelection selection = HandlerUtil.getCurrentSelection(event); | ||
|
||
if (selection != null && selection instanceof IStructuredSelection) { | ||
Object obj = ((IStructuredSelection) selection).getFirstElement(); | ||
if (obj != null) { | ||
EntityModel entityModel = (EntityModel) obj; | ||
|
||
if (Entity.USER_ITEM == Entity.getEntityType(entityModel)) { | ||
entityModel = MyWorkUtil.getEntityModelFromUserItem(entityModel); | ||
} | ||
|
||
Long id = Long.parseLong(entityModel.getValue("id").getValue().toString()); | ||
|
||
EntityModelEditorInput entityModelEditorInput = new EntityModelEditorInput(id, Entity.getEntityType(entityModel)); | ||
try { | ||
logger.log(new Status(Status.INFO, Activator.PLUGIN_ID, Status.OK, entityModelEditorInput.toString(), null)); | ||
page.openEditor(entityModelEditorInput, EntityModelEditor.ID); | ||
} catch (PartInitException e) { | ||
logger.log(new Status(Status.ERROR, Activator.PLUGIN_ID, Status.ERROR, "An exception has occured when opening the editor", e)); | ||
} | ||
} | ||
} | ||
return null; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
editor2 -> editor