Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAsma Smaoui2017-06-23 09:22:00 +0000
committerDani Megert2017-06-27 08:50:40 +0000
commit5969f68015db822366f4eb0df1cf2e855c944fd5 (patch)
tree2f03a41aca3ac4d06a3a2721a41ab0705a7997ff
parent0959c2f1b964601ccfd981d7a516bf08c74bdb22 (diff)
downloadeclipse.platform.ua-5969f68015db822366f4eb0df1cf2e855c944fd5.tar.gz
eclipse.platform.ua-5969f68015db822366f4eb0df1cf2e855c944fd5.tar.xz
eclipse.platform.ua-5969f68015db822366f4eb0df1cf2e855c944fd5.zip
Bug 517379 - [CheatSheet] how to extend current implementation, use
Cheatsheet as API, most of methods are not public change the visibility of some methods to public as well as the viewer attribute of the CheatsheetHelpPart class. Change-Id: I6721fe0d43b5ac01251bf97b39a28faa692a7509 Signed-off-by: Asma Smaoui <asma.smaoui@cea.fr>
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetHelpPart.java5
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java7
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/SubItemCompositeHolder.java7
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java7
4 files changed, 14 insertions, 12 deletions
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetHelpPart.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetHelpPart.java
index b20c4fbd6..af30bd21c 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetHelpPart.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetHelpPart.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2015 IBM Corporation and others.
+ * Copyright (c) 2005, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Asma Smaoui - CEA LIST - https://bugs.eclipse.org/bugs/show_bug.cgi?id=517379
*******************************************************************************/
package org.eclipse.ui.internal.cheatsheets.views;
@@ -36,7 +37,7 @@ public class CheatSheetHelpPart extends AbstractFormPart implements IHelpPart {
public static final String ID = "cheatsheet-page"; //$NON-NLS-1$
- private CheatSheetViewer viewer;
+ public CheatSheetViewer viewer;
private String id;
/**
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java
index 1cf50efb0..6be2b2be3 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/CheatSheetViewer.java
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Tom Hofmann, Perspectix AG - https://bugs.eclipse.org/bugs/show_bug.cgi?id=291750
+ * Asma Smaoui - CEA LIST - https://bugs.eclipse.org/bugs/show_bug.cgi?id=517379
*******************************************************************************/
package org.eclipse.ui.internal.cheatsheets.views;
@@ -201,7 +202,7 @@ public class CheatSheetViewer implements ICheatSheetViewer, IMenuContributor {
* 2. Otherwise if this is the final item return to the introduction
* 3. If neither condition 1 or 2 is satisfied move to the next item
*/
- void advanceItem(ImageHyperlink link, boolean markAsCompleted) {
+ public void advanceItem(ImageHyperlink link, boolean markAsCompleted) {
currentItem = (ViewItem) link.getData();
int indexNextItem = getIndexOfItem(currentItem) +1;
boolean isFinalItem = indexNextItem >= viewItemList.size();
@@ -270,7 +271,7 @@ public class CheatSheetViewer implements ICheatSheetViewer, IMenuContributor {
item.setAsCurrentActiveItem();
}
- /*package*/ void advanceSubItem(ImageHyperlink link, boolean markAsCompleted, int subItemIndex) {
+ public void advanceSubItem(ImageHyperlink link, boolean markAsCompleted, int subItemIndex) {
Label l = null;
ArrayList<SubItemCompositeHolder> list = null;
SubItemCompositeHolder sich = null;
@@ -1086,7 +1087,7 @@ public class CheatSheetViewer implements ICheatSheetViewer, IMenuContributor {
}
}
- /*package*/ void saveCurrentSheet() {
+ public void saveCurrentSheet() {
if(currentID != null) {
if (currentPage instanceof CheatSheetPage) {
Properties properties = saveHelper.createProperties(currentItemNum, viewItemList, getExpandRestoreActionState(), expandRestoreList, currentID, restorePath);
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/SubItemCompositeHolder.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/SubItemCompositeHolder.java
index 6e9c8dbd7..8a9400ccc 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/SubItemCompositeHolder.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/SubItemCompositeHolder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2015 IBM Corporation and others.
+ * Copyright (c) 2002, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Asma Smaoui - CEA LIST - https://bugs.eclipse.org/bugs/show_bug.cgi?id=517379
*******************************************************************************/
package org.eclipse.ui.internal.cheatsheets.views;
@@ -56,7 +57,7 @@ public class SubItemCompositeHolder {
/**
* @param isCompleted
*/
- /*package*/ void setCompleted(boolean isCompleted) {
+ public void setCompleted(boolean isCompleted) {
completed = isCompleted;
if (isCompleted && checkDoneLabel != null) {
checkDoneLabel.setImage(CheatSheetPlugin.getPlugin().getImage(ICheatSheetResource.CHEATSHEET_ITEM_COMPLETE));
@@ -67,7 +68,7 @@ public class SubItemCompositeHolder {
/**
* @param isSkipped
*/
- /*package*/ void setSkipped(boolean isSkipped) {
+ public void setSkipped(boolean isSkipped) {
skipped = isSkipped;
if (isSkipped && checkDoneLabel != null) {
checkDoneLabel.setImage(CheatSheetPlugin.getPlugin().getImage(ICheatSheetResource.CHEATSHEET_ITEM_SKIP));
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java
index fd9b44e40..3ab702bad 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/views/ViewItem.java
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Asma Smaoui - CEA LIST - https://bugs.eclipse.org/bugs/show_bug.cgi?id=517379
*******************************************************************************/
package org.eclipse.ui.internal.cheatsheets.views;
@@ -533,8 +534,7 @@ public abstract class ViewItem {
}
//marks the item as complete.
- /*package*/
- void setComplete() {
+ public void setComplete() {
completed = true;
checkDoneLabel.setImage(getCompleteImage());
@@ -544,8 +544,7 @@ public abstract class ViewItem {
}
//expands the item
- /*package*/
- void setExpanded() {
+ public void setExpanded() {
if (!mainItemComposite.isExpanded()) {
mainItemComposite.setExpanded(true);
if(initialized) {

Back to the top