Skip to content
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 42 commits into from
Mar 2, 2018
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4246edd
For Vlad, good luck!
Jan 11, 2018
100cc00
Correcting github org links to Micro Focus
Jan 15, 2018
b624378
Made some fields look editable in UI
Jan 16, 2018
f755459
Merge branch 'update-fields' of github.com:HPSoftware/octane-eclipse-…
Jan 16, 2018
e22acd3
Refactoring editor
Jan 19, 2018
e185dad
Major refactor for entity details view
Jan 22, 2018
d64dcd6
Merge branch 'update-fields' of
Jan 22, 2018
23dfc51
Made UI composites look like they are supposed to
Jan 23, 2018
d5cea57
Made phase combo box work as intended
Jan 24, 2018
66f4aae
Fixing phase resize issue
Jan 29, 2018
ec5907e
Made buttons appear even if entity has no phase
Jan 29, 2018
c84edf2
Vlad work in progress for fields composite
Jan 30, 2018
3bc1c4b
UI fields taking shape, refresh button working, buttons appearing
Feb 7, 2018
e661688
Made UI look better, added field display selector working(must click
Feb 13, 2018
163f29e
Refactoring the dropdown so it can handle clearing all options and
Feb 13, 2018
09cbd39
Fields selector works as intended
Feb 13, 2018
9672968
Fixed bug where description wouldn't expand properly after refresh
Feb 13, 2018
05be866
Made save button work for phases and some small code re-arrange
Feb 14, 2018
ca01dba
Fixed bug where Fields button wouldn't refresh after making a change to
Feb 15, 2018
9ee74da
merging master into update-fields
Feb 19, 2018
0323c1b
Added an error message when the user cannot open an entity (also related
Feb 19, 2018
709a2a7
Deactivated save button in case there's no transition for phase
Feb 19, 2018
7dfa368
Made save button more user friendly when there's no phase to be selected
Feb 20, 2018
b9f069a
Updated visible fields in an entityView to match those in octane
Feb 21, 2018
9b1e881
Fields button do not show fields that shouldn't appear
Feb 21, 2018
76bd674
Phase combo won't blow up when no transition is available
Feb 23, 2018
27ef4aa
Added visual separator to comments
Feb 23, 2018
72bc0b6
Added comment toggle button
Feb 23, 2018
9e2b72e
Comments section now collapses like in Octane and fixed problem with
Feb 23, 2018
68dcf74
Added copyrights to files that didn't have
Mar 1, 2018
eaf38f7
Merging master into update-fields
Mar 1, 2018
902c0f1
rererererererere factor!
Mar 1, 2018
117d044
Merge branch 'update-fields' of git@github.com:HPSoftware/octane-ecli…
Mar 1, 2018
87d2baa
format code and fixed bug for comments button where it'd show even it
Mar 1, 2018
e01ae06
Formatting code and re-adding code that Andras deleted :):):)
Mar 2, 2018
28f6d30
indentation / formatting code
Mar 2, 2018
9492839
Renaming packages, yay!
Mar 2, 2018
4d9e38b
Merging
Mar 2, 2018
ab67590
Solving pull requests changes
Mar 2, 2018
9ca846f
merging
Mar 2, 2018
fc5cce9
Solving pull requests changes
Mar 2, 2018
b8be10d
fixed defect where it wouldn't properly open an entity
Mar 2, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added octane-eclipse-plugin/icons/comments-16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions octane-eclipse-plugin/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

editor2 -> editor

name="EntityModelEditorNew">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming

</editor>
<editor
class="com.hpe.octane.ideplugins.eclipse.ui.search.SearchEditor"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
import com.hpe.octane.ideplugins.eclipse.preferences.PluginPreferenceStorage.PreferenceConstants;
import com.hpe.octane.ideplugins.eclipse.ui.editor.EntityModelEditor;
import com.hpe.octane.ideplugins.eclipse.ui.editor.EntityModelEditorInput;
import com.hpe.octane.ideplugins.eclipse.ui.editor.snake.KonamiCodeListener;
import com.hpe.octane.ideplugins.eclipse.ui.editor.snake.SnakeEditor;
import com.hpe.octane.ideplugins.eclipse.ui.search.SearchEditor;
import com.hpe.octane.ideplugins.eclipse.ui.snake.KonamiCodeListener;
import com.hpe.octane.ideplugins.eclipse.ui.snake.SnakeEditor;

/**
* The activator class controls the plug-in life cycle
Expand Down
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;
}
}
Loading