Project

General

Profile

Bug #3070

Меняется контекстное меню для удаления фрагмента в Properties view

Added by Viktoria Kopach about 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
06/19/2012
Due date:
% Done:

100%

Estimated time:
Detected in build:
0.13.156
Platform:
Windows x64
Published in build:
0.14.179

Description

1. В проекте путем выделения фрагмента создаем требование.
2. На вкладке Description этого требования кликаем правой кнопкой по фрагменту. Видим, что в открывшемся контекстном меню один пункт - Delete.
3. Кликаем в RE по документу (просто обычный клик).
4. Снова у требования на вкладке Description кликаем правой кнопкой по фрагменту. В контекстном меню вмеcто пункта Delete теперь находится пункт Team.
Переоткрытие Properties view для другого требования, создание требования с новым фрагментом - не помогает. Помогает только закрытие открытие самого окна Properties view.

Associated revisions

Revision 3222 (diff)
Added by Denis Kildishev about 6 years ago

fixes #3070: Change method of IWorkbenchPartSite receiving. Id called there is taken from actual execution. Overall problem was in
PlatformUI
.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.getActivePart().getSite()
This method can return RequlityCNF as active part when property is initializing. The reasons of this behavior are unclear and tends to be studied. Correct execution is provided when context Menu is added to PropertySheet. When menu is added to CNF, it disappears. So, this commit implicitly gets site of PropertySheet.
PS also different cosmetic changes are provided:
-interface of Location panel is added
-name of "Delete" action for location is changed to "Delete Location"
-delete behaviour for document location paper becomes more relevant:
-If location is selected, then delete location and all links in related requirements
-If requirement is selected then only link between it and corresponding location is removed. If there is no another related requirements for location, then delete it.

Revision 421f4891 (diff)
Added by Denis Kildishev about 6 years ago

fixes #3070: Change method of IWorkbenchPartSite receiving. Id called there is taken from actual execution. Overall problem was in
PlatformUI
.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.getActivePart().getSite()
This method can return RequlityCNF as active part when property is initializing. The reasons of this behavior are unclear and tends to be studied. Correct execution is provided when context Menu is added to PropertySheet. When menu is added to CNF, it disappears. So, this commit implicitly gets site of PropertySheet.
PS also different cosmetic changes are provided:
-interface of Location panel is added
-name of "Delete" action for location is changed to "Delete Location"
-delete behaviour for document location paper becomes more relevant:
-If location is selected, then delete location and all links in related requirements
-If requirement is selected then only link between it and corresponding location is removed. If there is no another related requirements for location, then delete it.

git-svn-id: https://forge.ispras.ru/svn/reqdb/trunk/requality@3222 f558eac1-05b1-4da7-9ed5-5050e8a619d6

Revision 3222 (diff)
Added by Denis Kildishev about 6 years ago

fixes #3070: Change method of IWorkbenchPartSite receiving. Id called there is taken from actual execution. Overall problem was in
PlatformUI
.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.getActivePart().getSite()
This method can return RequlityCNF as active part when property is initializing. The reasons of this behavior are unclear and tends to be studied. Correct execution is provided when context Menu is added to PropertySheet. When menu is added to CNF, it disappears. So, this commit implicitly gets site of PropertySheet.
PS also different cosmetic changes are provided:
-interface of Location panel is added
-name of "Delete" action for location is changed to "Delete Location"
-delete behaviour for document location paper becomes more relevant:
-If location is selected, then delete location and all links in related requirements
-If requirement is selected then only link between it and corresponding location is removed. If there is no another related requirements for location, then delete it.

History

#1

Updated by Denis Kildishev about 6 years ago

Причина непосредственно проблемы оказалась в подмене ActivePage на RequalityCNF. То есть обычно контекстное меню добавляется к org.eclipse.ui.views.PropertySheet, в то время как в описанной ситуации оно идет не туда. При этом к свойствам меню не подключается... В общем, непосредственно описаную ситуацию можно решить вызывая добавление контекстного меню напрямую к org.eclipse.ui.views.PropertySheet. Кстати, если вызывать код добавления меню после прошедших инициализаций, то он всегда будет пробовать добавиться к RequalityCNF.

#2

Updated by Denis Kildishev about 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3222.

#3

Updated by Андрей Третьяков about 6 years ago

  • Assignee set to Denis Kildishev
  • Target version set to 0.14
#4

Updated by Андрей Третьяков about 6 years ago

  • Published in build set to 0.14.179
#5

Updated by Viktoria Kopach about 6 years ago

  • Status changed from Resolved to Verified
#6

Updated by Alexey Khoroshilov almost 6 years ago

  • Status changed from Verified to Closed

Also available in: Atom PDF