Author: snjeza
Date: 2011-11-02 06:20:44 -0400 (Wed, 02 Nov 2011)
New Revision: 36132
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Activator.java
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/LaunchJUnitTest.java
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/OpenFileInEditor.java
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/OpenPreferencePage.java
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunProjectExample.java
Log:
JBIDE-10082 Add documentation for project examples custom actions
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Activator.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Activator.java 2011-11-02
09:40:49 UTC (rev 36131)
+++
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Activator.java 2011-11-02
10:20:44 UTC (rev 36132)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.cheatsheet;
import org.eclipse.core.runtime.IStatus;
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java 2011-11-02
09:40:49 UTC (rev 36131)
+++
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java 2011-11-02
10:20:44 UTC (rev 36132)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.cheatsheet.actions;
import java.io.File;
@@ -25,8 +35,26 @@
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectUtil;
+/**
+ *
+ * <p>Action that imports project examples to workspace.</p>
+ *
+ * @author snjeza
+ *
+ */
public class ImportProjectExample extends Action implements ICheatSheetAction {
+ /**
+ * Execution of the action
+ *
+ * @param params
+ * Array of parameters
+ * index 0: projectName,
+ * index 1: included projects,
+ * index 2: the URL of the project example
+ * @param manager
+ * Cheatsheet Manager
+ */
public void run(String[] params, ICheatSheetManager manager) {
if(params == null || params[0] == null || params[1] == null || params[2] == null ) {
return;
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/LaunchJUnitTest.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/LaunchJUnitTest.java 2011-11-02
09:40:49 UTC (rev 36131)
+++
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/LaunchJUnitTest.java 2011-11-02
10:20:44 UTC (rev 36132)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.cheatsheet.actions;
import org.eclipse.core.resources.IProject;
@@ -26,10 +36,27 @@
import org.jboss.tools.project.examples.cheatsheet.Messages;
import org.osgi.service.prefs.BackingStoreException;
+/**
+ *
+ * <p>Action that launches JUnit test.</p>
+ *
+ * @author snjeza
+ *
+ */
public class LaunchJUnitTest extends Action implements ICheatSheetAction {
private static final String ACTIVE_PROFILES = "activeProfiles"; //$NON-NLS-1$
+ /**
+ * Execution of the action
+ *
+ * @param params
+ * Array of parameters
+ * index 0: projectName,
+ * index 1: Maven profile,
+ * @param manager
+ * Cheatsheet Manager
+ */
public void run(String[] params, ICheatSheetManager manager) {
if (params == null || params[0] == null) {
return;
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/OpenFileInEditor.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/OpenFileInEditor.java 2011-11-02
09:40:49 UTC (rev 36131)
+++
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/OpenFileInEditor.java 2011-11-02
10:20:44 UTC (rev 36132)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.cheatsheet.actions;
import org.eclipse.core.resources.IFile;
@@ -27,8 +37,25 @@
import org.jboss.tools.common.model.ui.editor.EditorPartWrapper;
import org.jboss.tools.project.examples.cheatsheet.Messages;
+/**
+ *
+ * <p>Action that opens a file in an editor.</p>
+ *
+ * @author snjeza
+ *
+ */
public class OpenFileInEditor extends Action implements ICheatSheetAction {
+ /**
+ * Execution of the action
+ *
+ * @param params
+ * Array of parameters
+ * index 0: the file path,
+ * index 1,2: the range of the lines that will be selected
+ * @param manager
+ * Cheatsheet Manager
+ */
public void run(String[] params, ICheatSheetManager manager) {
if(params == null || params[0] == null ) {
return;
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/OpenPreferencePage.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/OpenPreferencePage.java 2011-11-02
09:40:49 UTC (rev 36131)
+++
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/OpenPreferencePage.java 2011-11-02
10:20:44 UTC (rev 36132)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.cheatsheet.actions;
import org.eclipse.jface.action.Action;
@@ -8,8 +18,24 @@
import org.eclipse.ui.cheatsheets.ICheatSheetManager;
import org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog;
+/**
+ *
+ * <p>Action that opens a preferences page.</p>
+ *
+ * @author snjeza
+ *
+ */
public class OpenPreferencePage extends Action implements ICheatSheetAction {
+ /**
+ * Execution of the action
+ *
+ * @param params
+ * Array of parameters
+ * index 0: preferences page id
+ * @param manager
+ * Cheatsheet Manager
+ */
public void run(String[] params, ICheatSheetManager manager) {
if(params == null || params[0] == null) {
return;
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java 2011-11-02
09:40:49 UTC (rev 36131)
+++
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java 2011-11-02
10:20:44 UTC (rev 36132)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.cheatsheet.actions;
import org.eclipse.core.resources.IFile;
@@ -21,8 +31,25 @@
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.tools.project.examples.cheatsheet.Activator;
+/**
+ *
+ * <p>Action that runs an application on a server.</p>
+ *
+ * @author snjeza
+ *
+ */
public class RunOnServer extends Action implements ICheatSheetAction {
+ /**
+ * Execution of the action
+ *
+ * @param params
+ * Array of parameters
+ * index 0: projectName,
+ * index 1: a file path we want to mark as deployable.
+ * @param manager
+ * Cheatsheet Manager
+ */
public void run(String[] params, ICheatSheetManager manager) {
if(params == null || params[0] == null) {
return;
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunProjectExample.java
===================================================================
---
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunProjectExample.java 2011-11-02
09:40:49 UTC (rev 36131)
+++
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunProjectExample.java 2011-11-02
10:20:44 UTC (rev 36132)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. 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
+ *
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
package org.jboss.tools.project.examples.cheatsheet.actions;
import java.util.ArrayList;
@@ -15,8 +25,24 @@
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectUtil;
+/**
+ *
+ * <p>Action that runs a project example.</p>
+ *
+ * @author snjeza
+ *
+ */
public class RunProjectExample extends Action implements ICheatSheetAction {
+ /**
+ * Execution of the action
+ *
+ * @param params
+ * Array of parameters
+ * index 0: <category>::<name> project example
+ * @param manager
+ * Cheatsheet Manager
+ */
public void run(String[] params, ICheatSheetManager manager) {
if(params == null || params[0] == null ) {
return;