JBoss Tools SVN: r11381 - in workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui: views/server/providers and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-30 22:23:28 -0400 (Thu, 30 Oct 2008)
New Revision: 11381
Removed:
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/
Modified:
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
Log:
Removing more outdated old-view stuff
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2008-10-31 02:11:39 UTC (rev 11380)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/XPathDialogs.java 2008-10-31 02:23:28 UTC (rev 11381)
@@ -37,7 +37,9 @@
import org.eclipse.jface.fieldassist.IContentProposalProvider;
import org.eclipse.jface.fieldassist.TextContentAdapter;
import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.SWT;
@@ -45,6 +47,7 @@
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
@@ -73,7 +76,6 @@
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.Messages;
-import org.jboss.ide.eclipse.as.ui.views.server.providers.descriptors.XPathPropertyLabelProvider;
/**
@@ -891,4 +893,49 @@
return server.getRuntime().getLocation().toOSString();
//return null;
}
+
+ public static class XPathPropertyLabelProvider extends LabelProvider implements ITableLabelProvider {
+ public Image getColumnImage(Object element, int columnIndex) {
+ return null;
+ }
+ public String getColumnText(Object element, int columnIndex) {
+ if( element instanceof XPathQuery) {
+ if( columnIndex == 0 ) return ((XPathQuery)element).getName();
+ if( columnIndex == 1 ) {
+ XPathResultNode[] nodes = getResultNodes(((XPathQuery)element));
+ if( nodes.length == 1 )
+ return nodes[0].getText();
+ }
+ }
+
+ if( element instanceof XPathFileResult ) {
+ XPathFileResult result = (XPathFileResult)element;
+ if( columnIndex == 0 ) {
+ return result.getFileLocation().substring(result.getQuery().getBaseDir().length());
+ }
+ if( result.getChildren().length == 1 ) {
+ element = result.getChildren()[0];
+ }
+ }
+
+ if( element instanceof XPathResultNode ) {
+ XPathResultNode element2 = (XPathResultNode)element;
+ if( columnIndex == 0 ) return Messages.DescriptorXPathMatch + element2.getIndex();
+ if( columnIndex == 1 ) return element2.getText().trim();
+ }
+
+ return null;
+ }
+
+ public XPathResultNode[] getResultNodes(XPathQuery query) {
+ ArrayList<XPathResultNode> l = new ArrayList<XPathResultNode>();
+ XPathFileResult[] files = query.getResults();
+ for( int i = 0; i < files.length; i++ ) {
+ l.addAll(Arrays.asList(files[i].getChildren()));
+ }
+ return l.toArray(new XPathResultNode[l.size()]);
+ }
+
+ }
+
}
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2008-10-31 02:11:39 UTC (rev 11380)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2008-10-31 02:23:28 UTC (rev 11381)
@@ -1,292 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.views.server.providers;
-
-
-/**
- *
- * @author Rob Stryker <rob.stryker(a)redhat.com>
- *
- */
-public class DescriptorXPathViewProvider { /*
-extends JBossServerViewExtension {
-
- private XPathTreeContentProvider contentProvider;
- private XPathTreeLabelProvider labelProvider;
- private DescriptorXPathPropertySheetPage propertyPage;
-
- public Action newXPathCategoryAction, deleteXPathCategoryAction, newXPathAction,
- editXPathAction, deleteXPathAction, editFileAction;
-
- private IServer server;
- private XPathCategory activeCategory;
- private Object selectedPropertyObject;
-
-
- public DescriptorXPathViewProvider() {
- contentProvider = new XPathTreeContentProvider();
- labelProvider = new XPathTreeLabelProvider();
- createActions();
- }
-
- public void setActiveCategory(XPathCategory o) {
- if( o != null && o != activeCategory) {
- activeCategory = o;
- }
- }
-
- public XPathCategory getActiveCategory() {
- return activeCategory;
- }
-
- public void setPropertySelection(Object o) {
- selectedPropertyObject = o;
- }
-
- public Object getPropertySelection() {
- return selectedPropertyObject;
- }
-
- protected class XPathTreeContentProvider implements ITreeContentProvider {
-
- public Object[] getChildren(Object parentElement) {
- if( parentElement instanceof ServerViewProvider ) {
- if( server == null ) return new Object[]{};
- return XPathModel.getDefault().getCategories(server);
- }
- return new Object[0];
- }
- public Object getParent(Object element) {
- return null;
- }
- public boolean hasChildren(Object element) {
- return getChildren(element).length > 0 ? true : false;
- }
- public Object[] getElements(Object inputElement) {
- return new Object[0];
- }
- public void dispose() {
- }
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if( oldInput != newInput ) {
- server = (IServer)newInput;
- }
- }
- }
-
- protected class XPathTreeLabelProvider extends LabelProvider {
-
- public Image getImage(Object element) {
- if( element instanceof XPathCategory) {
- return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER);
- }
- return null;
- }
-
- public String getText(Object element) {
- if( element instanceof XPathCategory) {
- return ((XPathCategory)element).getName();
- }
- return "";
- }
- }
-
-
- public ITreeContentProvider getContentProvider() {
- return contentProvider;
- }
-
- public LabelProvider getLabelProvider() {
- return labelProvider;
- }
-
- public void createActions() {
- newXPathCategoryAction = new Action() {
- public void run() {
- XPathCategoryDialog d = new XPathCategoryDialog(
- Display.getCurrent().getActiveShell(), server);
- if( d.open() == Window.OK ) {
- XPathModel.getDefault().addCategory(server, d.getText());
- XPathModel.getDefault().save(server);
- refreshViewer();
- }
- }
- };
- newXPathCategoryAction.setText("New Category");
-
- deleteXPathCategoryAction= new Action() {
- public void run() {
- int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO;
- MessageBox messageBox = new MessageBox (Display.getCurrent().getActiveShell(), style);
- messageBox.setText (Messages.DescriptorXPathRemoveCategory + "?");
- messageBox.setMessage (Messages.DescriptorXPathRemoveCategoryDesc);
- if( messageBox.open () == SWT.YES ) {
- XPathModel.getDefault().removeCategory(server, getActiveCategory().getName());
- XPathModel.getDefault().save(server);
- setActiveCategory(null);
- refreshViewer();
- }
- }
- };
- deleteXPathCategoryAction.setText(Messages.DescriptorXPathRemoveCategory);
-
-
- newXPathAction = new Action() {
- public void run() {
- XPathCategory category = getActiveCategory();
- if( category != null ) {
- String categoryName = category.getName();
- XPathDialog d = new XPathDialog(Display.getCurrent().getActiveShell(), server, categoryName);
- if( d.open() == Window.OK ) {
- XPathCategory[] categoryList = XPathModel.getDefault().getCategories(server);
- XPathCategory categoryItem = null;
- for( int i = 0; i < categoryList.length; i++ ) {
- if( categoryList[i].getName().equals(category.getName()))
- categoryItem = categoryList[i];
- }
- if( categoryItem != null ) {
- XPathQuery query = new XPathQuery(d.getName(), XPathDialogs.getConfigFolder(server), null, d.getXpath(), d.getAttribute());
- categoryItem.addQuery(query);
- XPathModel.getDefault().save(server);
- refreshViewer();
- }
- }
- }
- }
- };
- newXPathAction.setText(Messages.DescriptorXPathNewXPath);
-
- editXPathAction = new Action() {
- public void run() {
- Object o = getPropertySelection();
- if( o != null && o instanceof XPathQuery) {
- XPathQuery original = (XPathQuery)o;
- XPathCategory category = original.getCategory();
-
- XPathDialog d = new XPathDialog(Display.getCurrent().getActiveShell(),
- server, category.getName(), original.getName());
- d.setAttribute(original.getAttribute());
- d.setXpath(original.getXpathPattern());
-
- if( d.open() == Window.OK ) {
- original.setAttribute(d.getAttribute());
- original.setXpathPattern(d.getXpath());
- original.setName(d.getName());
- category.save();
- refreshViewer();
- }
- }
- }
- };
- editXPathAction.setText(Messages.DescriptorXPathEditXPath);
-
- deleteXPathAction = new Action() {
- public void run() {
- Object o = getPropertySelection();
- if( o instanceof XPathQuery ) {
- XPathCategory cat = ((XPathQuery)o).getCategory();
- cat.removeQuery((XPathQuery)o);
- cat.save();
- refreshViewer();
- }
- }
- };
- deleteXPathAction.setText(Messages.DescriptorXPathDeleteXPath);
-
- editFileAction = new Action() {
- public void run() {
- try {
- Object o = getPropertySelection();
- Path p = null;
- if( o instanceof XPathQuery && ((XPathQuery)o).getResults().length == 1 ) {
- o = (XPathFileResult) ((XPathQuery)o).getResults()[0];
- }
- if( o instanceof XPathFileResult ) {
- p = new Path(((XPathFileResult)o).getFileLocation());
- } else if( o instanceof XPathResultNode ) {
- p = new Path(((XPathResultNode)o).getFileLocation());
- }
- if( p != null ) {
-
-
- IFileStore fileStore = EFS.getLocalFileSystem().getStore(p.removeLastSegments(1));
- fileStore = fileStore.getChild(p.lastSegment());
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
- IWorkbenchPage page = win.getActivePage();
-
- if (!fileStore.fetchInfo().isDirectory() && fileStore.fetchInfo().exists()) {
- try {
- IDE.openEditorOnFileStore(page, fileStore);
- } catch (PartInitException e) {}
- }
- }
- } catch( Exception exc ) {
- JBossServerUIPlugin.log("Error running edit file action", exc);
- }
- }
- };
- editFileAction.setText("Edit File");
- }
-
- public void fillContextMenu(Shell shell, IMenuManager menu, Object[] selection) {
- if( selection[0] instanceof ServerViewProvider ) {
- menu.add(this.newXPathCategoryAction);
- menu.add(new Separator());
- return;
- }
-
- if( selection[0] instanceof XPathCategory ) {
- setActiveCategory((XPathCategory)selection[0]);
- menu.add(this.newXPathAction);
- menu.add(this.deleteXPathCategoryAction);
- menu.add(new Separator());
- }
- }
-
- protected boolean supports(IServer server) {
- return true;
- }
-
- // Property Sheet Page
- public IPropertySheetPage getPropertySheetPage() {
- if( propertyPage == null ) {
- propertyPage = new DescriptorXPathPropertySheetPage(this);
- }
- return propertyPage;
- }
-
- protected void refreshViewer() {
- if( isEnabled() ) {
- try {
- super.refreshViewer();
- if( propertyPage != null ) {
- propertyPage.getViewer().refresh();
- }
- } catch(Exception e) {
- JBossServerUIPlugin.log("Error refreshing view (descriptorXPathViewProvider)", e);
- }
- }
- }
- */
-
-}
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java 2008-10-31 02:11:39 UTC (rev 11380)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java 2008-10-31 02:23:28 UTC (rev 11381)
@@ -1,413 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.views.server.providers;
-
-
-/**
- *
- * @author Rob Stryker <rob.stryker(a)redhat.com>
- *
- */
-public class EventLogViewProvider {
- /*
- extends JBossServerViewExtension implements IEventLogListener, ISimplePropertiesHolder {
-
- public static final String SHOW_TIMESTAMP = "org.jboss.ide.eclipse.as.ui.views.server.providers.EventLogViewProvider.showTimestamp";
- public static final String GROUP_BY_CATEGORY = "org.jboss.ide.eclipse.as.ui.views.server.providers.EventLogViewProvider.groupByCategory";
- public static final String EVENT_ON_TOP = "org.jboss.ide.eclipse.as.ui.views.server.providers.EventLogViewProvider.eventOnTop";
- public static final int NEWEST_ON_TOP = 1;
- public static final int OLDEST_ON_TOP = 2;
- public static final int _TRUE_ = 1;
- public static final int _FALSE_ = 2;
-
- private ITreeContentProvider contentProvider;
- private LabelProvider labelProvider;
- private IEventLogLabelProvider[] labelProviderDelegates = null;
- private IPropertySheetPage propertyPage = null;
- private Object[] selection;
-
- private IServer input;
- private Action clearLogAction;
- private Action showStackTraceAction;
-
- private static HashMap<String, String> majorTypeToName = new HashMap<String, String>();
- static {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] cf = registry.getConfigurationElementsFor(JBossServerUIPlugin.PLUGIN_ID, "EventLogMajorType");
- for( int i = 0; i < cf.length; i++ ) {
- String type = cf[i].getAttribute("typeId");
- String name = cf[i].getAttribute("name");
- majorTypeToName.put(type, name);
- }
- }
-
-
- public EventLogViewProvider() {
- contentProvider = new EventLogContentProvider();
- labelProvider = new EventLogLabelProvider();
- EventLogModel.getDefault().addListener(this);
- createActions();
- }
-
- protected void createActions() {
- clearLogAction = new Action() {
- public void run() {
- try {
- EventLogModel.getModel(input).clearEvents();
- refreshViewer();
- } catch( Exception e) {}
- }
- };
- clearLogAction.setText("Clear Event Log");
-
- showStackTraceAction = new Action() {
- public void run() {
- EventLogTreeItem item = (EventLogTreeItem)selection[0];
- ShowStackTraceDialog dialog = new ShowStackTraceDialog(new Shell(), item);
- dialog.open();
- }
- };
- showStackTraceAction.setText("See Exception Details");
- }
-
- public class EventLogContentProvider implements ITreeContentProvider {
- public Object[] getChildren(Object parentElement) {
- if( parentElement instanceof ServerViewProvider && input != null ) {
- boolean categorize = getCategorize();
- if( categorize )
- return getRootCategories();
- Object[] ret = EventLogModel.getModel(input).getRoot().getChildren();
- if( getSortOrder()) {
- List<Object> l = Arrays.asList(ret);
- Collections.reverse(l);
- return l.toArray();
- }
- return ret;
- }
-
- if( parentElement instanceof String ) {
- // get children only of this type
- SimpleTreeItem[] children = EventLogModel.getModel(input).getRoot().getChildren();
- ArrayList<SimpleTreeItem> items = new ArrayList<SimpleTreeItem>();
- for( int i = 0; i < children.length; i++ ) {
- if( children[i] instanceof EventLogTreeItem ) {
- String type = ((EventLogTreeItem)children[i]).getEventClass();
- if( type != null && type.equals(parentElement))
- items.add(children[i]);
- }
- }
-
- if( getSortOrder() ) Collections.reverse(items);
-
- return items.toArray(new Object[items.size()]);
- }
-
- // just return the object's kids
- if( parentElement instanceof EventLogTreeItem ) {
- return ((EventLogTreeItem)parentElement).getChildren();
- }
- return new Object[0];
- }
-
- protected Object[] getRootCategories() {
- EventLogRoot root = EventLogModel.getModel(input).getRoot();
- ArrayList<String> majorTypes = new ArrayList<String>();
- SimpleTreeItem[] children = root.getChildren();
- for( int i = 0; i < children.length; i++ ) {
- if( children[i] instanceof EventLogTreeItem ) {
- String type = ((EventLogTreeItem)children[i]).getEventClass();
- if( !majorTypes.contains(type))
- majorTypes.add(type);
- }
- }
- return majorTypes.toArray(new String[majorTypes.size()]);
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return getChildren(element).length > 0 ? true : false;
- }
-
- public Object[] getElements(Object inputElement) {
- // Unused
- return null;
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- input = (IServer)newInput;
- }
-
- }
-
- public class EventLogLabelProvider extends LabelProvider {
- public Image getImage(Object element) {
- if( labelProviderDelegates == null )
- loadLabelProviderDelegates();
-
- if( element instanceof ServerViewProvider ) {
- return ((ServerViewProvider)element).getImage();
- }
-
- if( !(element instanceof EventLogTreeItem)) return null;
- EventLogTreeItem item = (EventLogTreeItem)element;
-
- for( int i = 0; i < labelProviderDelegates.length; i++ ) {
- if( labelProviderDelegates[i] != null
- && labelProviderDelegates[i].supports(item.getSpecificType())) {
- Image image = labelProviderDelegates[i].getImage((EventLogTreeItem)element);
- if( image != null ) return image;
- }
- }
-
- return null;
- }
-
- public String getText(Object element) {
- if( element == null ) return "NULL, ERROR";
- String suffix = getShowTimestamp() ? createTimestamp(element) : "";
- if( labelProviderDelegates == null )
- loadLabelProviderDelegates();
-
- if( element instanceof ServerViewProvider ) {
- return ((ServerViewProvider)element).getName();
- }
-
- if( !(element instanceof EventLogTreeItem)) {
- if( element instanceof String ) {
- String val = majorTypeToName.get(element);
- if( val != null ) return val;
- }
- return element.toString();
- }
- EventLogTreeItem item = (EventLogTreeItem)element;
-
- for( int i = 0; i < labelProviderDelegates.length; i++ ) {
- if( labelProviderDelegates[i] != null
- && labelProviderDelegates[i].supports(item.getSpecificType())) {
- String text = labelProviderDelegates[i].getText((EventLogTreeItem)element);
- if( text != null ) return text + suffix;
- }
- }
-
- return element == null ? "" : element.toString() + suffix;
- }
-
- public void loadLabelProviderDelegates() {
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] elements = registry.getConfigurationElementsFor(JBossServerUIPlugin.PLUGIN_ID, "EventLogLabelProvider");
- labelProviderDelegates = new IEventLogLabelProvider[elements.length];
- for( int i = 0; i < elements.length; i++ ) {
- try {
- labelProviderDelegates[i] = (IEventLogLabelProvider)elements[i].createExecutableExtension("class");
- } catch( CoreException ce ) {
- JBossServerUIPlugin.log("Error loading Event Log Label Provider Delegate", ce);
- }
- }
- }
- }
-
- public void fillContextMenu(Shell shell, IMenuManager menu, Object selection[]) {
- this.selection = selection;
- if( selection.length == 1 && selection[0] == this.provider) {
- menu.add(clearLogAction);
- }
- if( selection.length == 1 && selection[0] instanceof EventLogTreeItem &&
- (((EventLogTreeItem)selection[0]).getEventClass().equals(EventLogModel.EVENT_TYPE_EXCEPTION) ||
- ((EventLogTreeItem)selection[0]).getSpecificType().equals(EventLogModel.EVENT_TYPE_EXCEPTION))) {
- menu.add(showStackTraceAction);
- }
- }
-
- public ITreeContentProvider getContentProvider() {
- return contentProvider;
- }
-
- public LabelProvider getLabelProvider() {
- return labelProvider;
- }
-
- public IPropertySheetPage getPropertySheetPage() {
- if( propertyPage == null )
- propertyPage = PropertySheetFactory.createSimplePropertiesSheet(this);
- return propertyPage;
- }
-
-
- public void eventModelChanged(String serverId, EventLogTreeItem changed) {
- if( input != null && serverId.equals(input.getId())) {
- if(changed.getSpecificType().equals(EventLogModel.JBOSS_EVENT_ROOT_TYPE))
- refreshViewer();
- else
- refreshViewer(changed);
- }
- }
-
- public Properties getProperties(Object selected) {
- if( !(selected instanceof EventLogTreeItem)) return new Properties();
- EventLogTreeItem item = (EventLogTreeItem)selected;
-
- for( int i = 0; i < labelProviderDelegates.length; i++ ) {
- if( labelProviderDelegates[i] != null
- && labelProviderDelegates[i].supports(item.getSpecificType())) {
- Properties props = labelProviderDelegates[i].getProperties((EventLogTreeItem)selected);
- if( props != null ) return props;
- }
- }
- return new Properties();
- }
-
- public EventLogPreferenceComposite createPreferenceComposite(Composite parent) {
- return new EventLogPreferenceComposite(parent);
- }
-
- protected class EventLogPreferenceComposite extends Composite {
- private Button newestFirst, oldestFirst, showTime, sort;
- private Group firstGroup;
- public EventLogPreferenceComposite(Composite parent) {
- super(parent, SWT.NONE);
- setLayout(new FormLayout());
-
- createWidgets();
- fillWidgetsWithValues();
- }
- protected void fillWidgetsWithValues() {
- boolean showTimestamp = getShowTimestamp();
- boolean categorize = getCategorize();
- boolean onTop = getSortOrder();
-
- sort.setSelection(categorize);
- showTime.setSelection(showTimestamp);
- newestFirst.setSelection(onTop);
- oldestFirst.setSelection(!onTop);
- }
-
-
- protected void createWidgets() {
- firstGroup = new Group(this, SWT.NONE);
- firstGroup.setText("Which elements should be at the top?");
- firstGroup.setLayout(new GridLayout(2, false));
- newestFirst = new Button(firstGroup, SWT.RADIO);
- oldestFirst = new Button(firstGroup, SWT.RADIO);
-
- newestFirst.setText("Newest");
- oldestFirst.setText("Oldest");
-
- FormData firstGroupData = new FormData();
- firstGroupData.left = new FormAttachment(0,5);
- firstGroupData.top = new FormAttachment(0,5);
- firstGroup.setLayoutData(firstGroupData);
-
- showTime = new Button(this, SWT.CHECK);
- showTime.setText("Show timestamp? (ex: x minutes ago)");
-
- FormData d = new FormData();
- d.left = new FormAttachment(0, 5);
- d.top = new FormAttachment(firstGroup, 5);
- showTime.setLayoutData(d);
-
- sort = new Button(this, SWT.CHECK);
- sort.setText("Sort by event category?");
-
- d = new FormData();
- d.left = new FormAttachment(0, 5);
- d.top = new FormAttachment(showTime, 5);
- sort.setLayoutData(d);
- }
- public boolean isValid() {
- return true;
- }
- public boolean performCancel() {
- return true;
- }
- public boolean performOk() {
- Preferences store = JBossServerUIPlugin.getDefault().getPluginPreferences();
- store.setValue(SHOW_TIMESTAMP, showTime.getSelection() ? _TRUE_ : _FALSE_);
- store.setValue(GROUP_BY_CATEGORY, sort.getSelection() ? _TRUE_ : _FALSE_);
- store.setValue(EVENT_ON_TOP, newestFirst.getSelection() ? NEWEST_ON_TOP : OLDEST_ON_TOP);
- return true;
- }
- public void performDefaults() {
- showTime.setSelection(false);
- newestFirst.setSelection(true);
- oldestFirst.setSelection(false);
- sort.setSelection(false);
- }
- }
-
-
-
-
- protected boolean getShowTimestamp() {
- Preferences store = JBossServerUIPlugin.getDefault().getPluginPreferences();
- int showTimestamp = store.getInt(SHOW_TIMESTAMP);
- if( showTimestamp == _TRUE_ ) return true;
- if( showTimestamp == _FALSE_) return false;
- return false; // default
- }
- protected boolean getSortOrder() {
- Preferences store = JBossServerUIPlugin.getDefault().getPluginPreferences();
- int showTimestamp = store.getInt(EVENT_ON_TOP);
- if( showTimestamp == OLDEST_ON_TOP) return false;
- return true;
- }
- protected boolean getCategorize() {
- Preferences store = JBossServerUIPlugin.getDefault().getPluginPreferences();
- int showTimestamp = store.getInt(GROUP_BY_CATEGORY);
- if( showTimestamp == _TRUE_ ) return true;
- if( showTimestamp == _FALSE_) return false;
- return false; // default
- }
-
- protected String createTimestamp(Object element) {
- if( element instanceof EventLogTreeItem ) {
- Long v = (Long) ((EventLogTreeItem)element).getProperty(EventLogTreeItem.DATE);
- if( v == null ) return "";
-
- double date = v.doubleValue();
- double now = new Date().getTime();
- int seconds = (int) (( now - date) / 1000);
- int minutes = seconds / 60;
- int hours = minutes / 60;
- minutes -= (hours * 60);
- String minString = minutes + "m ago";
- if( hours == 0 )
- return " (" + minString + ")";
- return " (" + hours + "h " + minString + ")";
- }
- return "";
- }
-
- public void enable() {
- EventLogModel.enableLogging();
- }
- public void disable() {
- EventLogModel.disableLogging();
- }
-
-*/
-}
16 years, 2 months
JBoss Tools SVN: r11379 - in workspace/rstryker/viewRefactor/plugins: org.jboss.ide.eclipse.archives.webtools/META-INF and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-30 22:09:33 -0400 (Thu, 30 Oct 2008)
New Revision: 11379
Added:
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/Fileset.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetActionProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetContentProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetDialog.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetLabelProvider.java
Modified:
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetViewProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerActionMessages.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogContentProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerContentProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
Removing old server view in favor of new one
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF 2008-10-30 22:32:17 UTC (rev 11378)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/META-INF/MANIFEST.MF 2008-10-31 02:09:33 UTC (rev 11379)
@@ -18,7 +18,8 @@
org.jboss.ide.eclipse.as.core;bundle-version="1.0.0",
org.eclipse.ui.ide;bundle-version="3.4.0",
org.jboss.ide.eclipse.as.ui;bundle-version="1.0.0",
- org.eclipse.core.filesystem;bundle-version="1.2.0"
+ org.eclipse.core.filesystem;bundle-version="1.2.0",
+ org.eclipse.ui.navigator;bundle-version="3.3.100"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.jboss.ide.eclipse.archives.webtools,
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml 2008-10-30 22:32:17 UTC (rev 11378)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml 2008-10-31 02:09:33 UTC (rev 11379)
@@ -91,13 +91,57 @@
priority="5">
</publisher>
</extension>
- <extension
- point="org.jboss.ide.eclipse.as.ui.ServerViewExtension">
- <ViewProvider
- description="A front end to open, edit, or view files in your server's directories."
- icon="icons/multiple_files.gif"
- id="org.jboss.ide.eclipse.as.ui.FilesetViewProvider"
- name="File Filters"
- providerClass="org.jboss.ide.eclipse.archives.webtools.ui.FilesetViewProvider"/>
- </extension>
+
+
+
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <navigatorContent
+ id="org.jboss.ide.eclipse.archives.webtools.ui.extensions.filesets"
+ activeByDefault="true"
+ icon="icons/multiple_files.gif"
+ contentProvider="org.jboss.ide.eclipse.archives.webtools.ui.FilesetContentProvider"
+ labelProvider="org.jboss.ide.eclipse.archives.webtools.ui.FilesetLabelProvider"
+ name="Filesets"
+ priority="normal">
+ <triggerPoints>
+ <instanceof
+ value="org.eclipse.wst.server.core.IServer">
+ </instanceof>
+ </triggerPoints>
+ <possibleChildren>
+ <or>
+ <instanceof
+ value="org.jboss.ide.eclipse.archives.webtools.ui.FilesetContentProvider$ServerWrapper">
+ </instanceof>
+ <instanceof
+ value="org.jboss.ide.eclipse.archives.webtools.ui.Fileset">
+ </instanceof>
+ <instanceof
+ value="org.jboss.ide.eclipse.archives.webtools.ui.FilesetContentProvider$FolderWrapper">
+ </instanceof>
+ <instanceof
+ value="org.jboss.ide.eclipse.archives.webtools.ui.FilesetContentProvider$PathWrapper">
+ </instanceof>
+ </or></possibleChildren>
+ <actionProvider
+ class="org.jboss.ide.eclipse.archives.webtools.ui.FilesetActionProvider"
+ id="rg.jboss.ide.eclipse.archives.webtools.ui.extensions.filesets.actions"
+ priority="highest">
+ </actionProvider>
+ </navigatorContent>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding
+ viewerId="org.jboss.tools.as.wst.server.ui.ServersView">
+ <includes>
+ <contentExtension
+ isRoot="false"
+ pattern="org.jboss.ide.eclipse.archives.webtools.ui.extensions.filesets">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+
</plugin>
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/Fileset.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/Fileset.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/Fileset.java 2008-10-31 02:09:33 UTC (rev 11379)
@@ -0,0 +1,99 @@
+package org.jboss.ide.eclipse.archives.webtools.ui;
+
+
+public class Fileset implements Cloneable {
+ private static final String HASH_SEPARATOR = "::_::"; //$NON-NLS-1$
+ private String name, folder, includesPattern, excludesPattern;
+ public Fileset() {
+ }
+ public Fileset(String string) {
+ try {
+ name = folder = includesPattern =excludesPattern = ""; //$NON-NLS-1$
+ String[] parts = string.split("\n"); //$NON-NLS-1$
+ name = parts[0];
+ folder = parts[1];
+ includesPattern = parts[2];
+ excludesPattern = parts[3];
+ } catch( ArrayIndexOutOfBoundsException aioobe) {}
+ }
+
+ public Fileset(String name, String folder, String inc, String exc) {
+ this.name = name;
+ this.folder = folder;
+ includesPattern = inc;
+ excludesPattern = exc;
+ }
+ public String toString() {
+ return name + "\n" + folder + "\n" + includesPattern + "\n" + excludesPattern; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+ }
+ /**
+ * @return the folder
+ */
+ public String getFolder() {
+ return folder == null ? "" : folder; //$NON-NLS-1$
+ }
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name == null ? "" : name; //$NON-NLS-1$
+ }
+ /**
+ * @return the excludesPattern
+ */
+ public String getExcludesPattern() {
+ return excludesPattern == null ? "" : excludesPattern; //$NON-NLS-1$
+ }
+ /**
+ * @return the includesPattern
+ */
+ public String getIncludesPattern() {
+ return includesPattern == null ? "" : includesPattern; //$NON-NLS-1$
+ }
+
+ /**
+ * @param excludesPattern the excludesPattern to set
+ */
+ public void setExcludesPattern(String excludesPattern) {
+ this.excludesPattern = excludesPattern;
+ }
+
+ /**
+ * @param folder the folder to set
+ */
+ public void setFolder(String folder) {
+ this.folder = folder;
+ }
+
+ /**
+ * @param includesPattern the includesPattern to set
+ */
+ public void setIncludesPattern(String includesPattern) {
+ this.includesPattern = includesPattern;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Object clone() {
+ try {
+ return super.clone();
+ } catch( Exception e ) {}
+ return null;
+ }
+
+ public boolean equals(Object other) {
+ if( !(other instanceof Fileset)) return false;
+ if( other == this ) return true;
+ Fileset o = (Fileset)other;
+ return o.getName().equals(getName()) && o.getFolder().equals(getFolder())
+ && o.getIncludesPattern().equals(getIncludesPattern()) && o.getExcludesPattern().equals(getExcludesPattern());
+ }
+ public int hashCode() {
+ return (name + HASH_SEPARATOR + folder + HASH_SEPARATOR + includesPattern + HASH_SEPARATOR + excludesPattern + HASH_SEPARATOR).hashCode();
+ }
+}
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetActionProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetActionProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetActionProvider.java 2008-10-31 02:09:33 UTC (rev 11379)
@@ -0,0 +1,270 @@
+package org.jboss.ide.eclipse.archives.webtools.ui;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.FileStoreEditorInput;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
+import org.jboss.ide.eclipse.archives.webtools.ui.FilesetContentProvider.PathWrapper;
+import org.jboss.ide.eclipse.archives.webtools.ui.FilesetContentProvider.ServerWrapper;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.util.FileUtil;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
+
+public class FilesetActionProvider extends CommonActionProvider {
+ private ICommonActionExtensionSite actionSite;
+ private Action createFilter, deleteFilter, editFilter,
+ deleteFileAction, editFileAction;
+ private ITreeSelection treeSelection;
+ private Object[] selected;
+
+ public FilesetActionProvider() {
+ super();
+ }
+
+ public void init(ICommonActionExtensionSite aSite) {
+ super.init(aSite);
+ this.actionSite = aSite;
+ createActions();
+ }
+
+ public void fillContextMenu(IMenuManager menu) {
+ ICommonViewerSite site = actionSite.getViewSite();
+ if (site instanceof ICommonViewerWorkbenchSite) {
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite) site;
+ ITreeSelection selection = (ITreeSelection) wsSite.getSelectionProvider()
+ .getSelection();
+ this.treeSelection = selection;
+ selected = selection.toArray();
+ if( selected[0] instanceof ServerWrapper ) {
+ menu.add(createFilter);
+ }else if( selected.length == 1 && selected[0] instanceof Fileset ) {
+ menu.add(deleteFilter);
+ menu.add(editFilter);
+ } else if( allPathWrappers(selected) ) {
+ editFileAction.setEnabled(canEdit(selected));
+ deleteFileAction.setEnabled(canDelete(selected));
+ menu.add(editFileAction);
+ menu.add(deleteFileAction);
+ }
+ }
+ }
+
+ protected boolean allPathWrappers(Object[] list) {
+ boolean result = true;
+ for( int i = 0; i < list.length; i++ )
+ result &= list[i] instanceof PathWrapper;
+ return result;
+ }
+
+ protected boolean canDelete(Object[] list ) {
+ boolean result = true;
+ for( int i = 0; i < list.length; i++ )
+ result &= ((PathWrapper)list[i]).getPath().toFile().exists();
+ return result;
+ }
+
+ protected boolean canEdit(Object[] list) {
+ for( int i = 0; i < list.length; i++ )
+ if( canEdit(((PathWrapper)list[i]).getPath().toFile()))
+ return true;
+ return false;
+ }
+
+ protected boolean canEdit(File file) {
+ IFile eclipseFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(file.getAbsolutePath()));
+ IFileStore fileStore= EFS.getLocalFileSystem().fromLocalFile(file);
+ boolean editable = false;
+ if( eclipseFile != null ) {
+ IEditorInput input = new FileEditorInput(eclipseFile);
+ IEditorDescriptor desc = PlatformUI.getWorkbench().
+ getEditorRegistry().getDefaultEditor(file.getName());
+ if( input != null && desc != null )
+ editable = true;
+ } else if( fileStore != null ){
+ IEditorInput input = new FileStoreEditorInput(fileStore);
+ IEditorDescriptor desc = PlatformUI.getWorkbench().
+ getEditorRegistry().getDefaultEditor(file.getName());
+ if( input != null && desc != null )
+ editable = true;
+ }
+ return editable;
+ }
+
+ protected File[] getSelectedFiles() {
+ ArrayList<File> tmp = new ArrayList<File>();
+ for( int i = 0; i < selected.length; i++ ) {
+ if( selected[i] instanceof PathWrapper)
+ tmp.add(((PathWrapper)selected[i]).getPath().toFile());
+ }
+ return (File[]) tmp.toArray(new File[tmp.size()]);
+ }
+
+ protected ServerWrapper getServerWrapper(Fileset fs) {
+ TreePath[] paths = treeSelection.getPathsFor(fs);
+ if( paths.length == 1 ) {
+ int count = paths[0].getSegmentCount();
+ if( count > 1 ) {
+ Object wrapper = paths[0].getSegment(count-2);
+ if( wrapper != null && wrapper instanceof ServerWrapper ) {
+ return ((ServerWrapper)wrapper);
+ }
+ }
+ }
+ return null;
+ }
+
+ protected void createActions() {
+ createFilter = new Action() {
+ public void run() {
+ IServer iserver = null;
+ ServerWrapper wrapper;
+ if( !(selected[0] instanceof ServerWrapper))
+ return;
+
+ wrapper = (ServerWrapper)selected[0];
+ iserver = wrapper.server;
+
+ IDeployableServer server = (IDeployableServer) iserver
+ .loadAdapter(IDeployableServer.class,
+ new NullProgressMonitor());
+ String location = null;
+ if (server != null)
+ location = server.getConfigDirectory();
+ else
+ location = iserver.getRuntime().getLocation().toOSString();
+
+ if (location != null) {
+ FilesetDialog d = new FilesetDialog(new Shell(), location);
+ if (d.open() == Window.OK) {
+ Fileset fs = d.getFileset();
+ wrapper.addFileset(fs);
+ }
+ }
+ }
+ };
+ createFilter.setText(Messages.FilesetsCreateFilter);
+
+ deleteFilter = new Action() {
+ public void run() {
+ Fileset fs = (Fileset)selected[0];
+ ServerWrapper wrapper = getServerWrapper(fs);
+ if( wrapper != null )
+ wrapper.removeFileset(fs);
+ }
+ };
+ deleteFilter.setText(Messages.FilesetsDeleteFilter);
+
+ editFilter = new Action() {
+ public void run() {
+ Fileset sel = (Fileset)selected[0];
+ ServerWrapper wrapper = getServerWrapper(sel);
+ FilesetDialog d = new FilesetDialog(new Shell(), sel);
+ if (d.open() == Window.OK) {
+ Fileset ret = d.getFileset();
+ sel.setName(ret.getName());
+ sel.setFolder(ret.getFolder());
+ sel.setIncludesPattern(ret.getIncludesPattern());
+ sel.setExcludesPattern(ret.getExcludesPattern());
+ wrapper.saveFilesets();
+ }
+ }
+ };
+ editFilter.setText(Messages.FilesetsEditFilter);
+
+ deleteFileAction = new Action() {
+ public void run() {
+ try {
+ Shell shell = Display.getCurrent().getActiveShell();
+ File[] files = getSelectedFiles();
+ MessageBox mb = new MessageBox(shell, SWT.ICON_QUESTION
+ | SWT.OK | SWT.CANCEL);
+ mb.setText(Messages.DeleteFiles);
+ mb.setMessage(Messages.DeleteFilesMessage);
+ if (mb.open() == SWT.OK) {
+ for (int i = 0; i < files.length; i++)
+ FileUtil.safeDelete(files[i]);
+ refreshViewer();
+ }
+ } catch (Exception e) {
+ }
+ }
+ };
+ deleteFileAction.setText(Messages.FilesetsDeleteFile);
+
+ editFileAction = new Action() {
+ public void run() {
+ File[] files = getSelectedFiles();
+ IWorkbench wb = PlatformUI.getWorkbench();
+ IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
+ IWorkbenchPage page = win.getActivePage();
+ for (int i = 0; i < files.length; i++) {
+ try {
+ IFile eclipseFile = ResourcesPlugin.getWorkspace()
+ .getRoot().getFileForLocation(
+ new Path(files[i].getAbsolutePath()));
+ IFileStore fileStore = EFS.getLocalFileSystem()
+ .fromLocalFile(files[i]);
+ if (eclipseFile != null) {
+ IEditorInput input = new FileEditorInput(
+ eclipseFile);
+ IEditorDescriptor desc = PlatformUI.getWorkbench()
+ .getEditorRegistry().getDefaultEditor(
+ files[i].getName());
+ if (desc != null)
+ page.openEditor(input, desc.getId());
+ } else if (fileStore != null) {
+ IEditorInput input = new FileStoreEditorInput(
+ fileStore);
+ IEditorDescriptor desc = PlatformUI.getWorkbench()
+ .getEditorRegistry().getDefaultEditor(
+ files[i].getName());
+ if (desc != null)
+ page.openEditor(input, desc.getId());
+ }
+ } catch (Exception e) {
+ IStatus status = new Status(IStatus.ERROR,
+ JBossServerUIPlugin.PLUGIN_ID,
+ Messages.FilesetsCannotOpenFile, e);
+ JBossServerUIPlugin.getDefault().getLog().log(status);
+ }
+ }
+ }
+ };
+ editFileAction.setText(Messages.FilesetsEditFile);
+ }
+
+ protected void refreshViewer() {
+ actionSite.getStructuredViewer().refresh();
+ }
+
+}
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetContentProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetContentProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetContentProvider.java 2008-10-31 02:09:33 UTC (rev 11379)
@@ -0,0 +1,245 @@
+package org.jboss.ide.eclipse.archives.webtools.ui;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.tools.ant.BuildException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.archives.core.asf.DirectoryScanner;
+import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
+
+public class FilesetContentProvider implements ITreeContentProvider {
+ private static final String FILESET_KEY = "org.jboss.ide.eclipse.as.ui.views.server.providers.FilesetViewProvider.PropertyKey"; //$NON-NLS-1$
+
+ public static class PathWrapper {
+ private IPath path;
+ private IPath folder;
+
+ public PathWrapper(IPath path, IPath folder) {
+ this.path = path;
+ this.folder = folder;
+ }
+
+ public IPath getFolder() {
+ return folder;
+ }
+
+ public IPath getPath() {
+ return folder.append(path);
+ }
+
+ public String getLocalizedResourceName() {
+ return path.toOSString();
+ }
+ }
+
+ public static class FolderWrapper extends PathWrapper {
+ private HashMap<String, FolderWrapper> childrenFolders;
+ private ArrayList<PathWrapper> children;
+
+ public FolderWrapper(IPath path, IPath folder) {
+ super(path, folder);
+ children = new ArrayList<PathWrapper>();
+ childrenFolders = new HashMap<String, FolderWrapper>();
+ }
+
+ public void addChild(IPath path) {
+ if (path.segmentCount() == 1) {
+ children.add(new PathWrapper(path, getFolder().append(
+ getLocalizedResourceName())));
+ } else {
+ addPath(children, childrenFolders, path, getFolder().append(
+ getLocalizedResourceName()));
+ }
+ }
+
+ public Object[] getChildren() {
+ return children.toArray(new Object[children.size()]);
+ }
+
+ private void addPath(ArrayList<PathWrapper> children,
+ HashMap<String, FolderWrapper> folders, IPath path, IPath folder) {
+ try {
+ FolderWrapper fw = null;
+ if (!folders.containsKey(path.segment(0))) {
+ fw = new FolderWrapper(path.removeLastSegments(path
+ .segmentCount() - 1), folder);
+ folders.put(path.segment(0), fw);
+ children.add(fw);
+ } else {
+ fw = folders.get(path.segment(0));
+ }
+ fw.addChild(path.removeFirstSegments(1));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public class ServerWrapper {
+ public IServer server;
+ private Fileset[] children;
+
+ public ServerWrapper(IServer server) {
+ this.server = server;
+ }
+
+ public int hashCode() {
+ return server.getId().hashCode();
+ }
+
+ public boolean equals(Object other) {
+ return other instanceof ServerWrapper
+ && ((ServerWrapper) other).server.getId().equals(
+ server.getId());
+ }
+
+ public void addFileset(Fileset fs) {
+ Fileset[] filesetsNew = new Fileset[children.length + 1];
+ System.arraycopy(children, 0, filesetsNew, 0, children.length);
+ filesetsNew[filesetsNew.length - 1] = fs;
+ children = filesetsNew;
+ saveFilesets();
+ }
+
+ public void removeFileset(Fileset fs) {
+ ArrayList<Fileset> asList = new ArrayList<Fileset>(Arrays
+ .asList(children));
+ asList.remove(fs);
+ children = asList.toArray(new Fileset[asList.size()]);
+ saveFilesets();
+ }
+
+ public Fileset[] getFilesets() {
+ if (children == null)
+ children = loadFilesets();
+ return children;
+ }
+
+ private Fileset[] loadFilesets() {
+ Fileset[] filesets = new Fileset[0];
+ if (server != null) {
+ ServerAttributeHelper helper = ServerAttributeHelper
+ .createHelper(server);
+ List tmp = helper.getAttribute(FILESET_KEY, new ArrayList());
+ String[] asStrings = (String[]) tmp.toArray(new String[tmp
+ .size()]);
+ filesets = new Fileset[asStrings.length];
+ for (int i = 0; i < asStrings.length; i++) {
+ filesets[i] = new Fileset(asStrings[i]);
+ }
+ }
+ return filesets;
+ }
+
+ public void saveFilesets() {
+ if (server != null) {
+ ArrayList<String> list = new ArrayList<String>();
+ for (int i = 0; i < children.length; i++) {
+ list.add(children[i].toString());
+ }
+ ServerAttributeHelper helper = ServerAttributeHelper
+ .createHelper(server);
+ helper.setAttribute(FILESET_KEY, list);
+ helper.save();
+ }
+ }
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof IServer) {
+ return new Object[] { new ServerWrapper((IServer) parentElement) };
+ }
+ if (parentElement instanceof ServerWrapper) {
+ return ((ServerWrapper) parentElement).getFilesets();
+ } else if (parentElement instanceof Fileset) {
+ Fileset fs = (Fileset) parentElement;
+ IPath[] paths = null;
+ try {
+ paths = findPaths(fs.getFolder(), fs.getIncludesPattern(), fs
+ .getExcludesPattern());
+ } catch (BuildException be) {
+ return new Object[] {};
+ }
+
+ HashMap<String, FolderWrapper> folders = new HashMap<String, FolderWrapper>();
+ ArrayList<PathWrapper> wrappers = new ArrayList<PathWrapper>();
+ for (int i = 0; i < paths.length; i++) {
+ if (paths[i].segmentCount() == 1) {
+ wrappers.add(new PathWrapper(paths[i], new Path(fs
+ .getFolder())));
+ } else {
+ addPath(wrappers, folders, paths[i], new Path(fs
+ .getFolder()));
+ }
+ }
+ return wrappers.toArray(new Object[wrappers.size()]);
+ } else if (parentElement instanceof FolderWrapper) {
+ return ((FolderWrapper) parentElement).getChildren();
+ }
+ return new Object[0];
+ }
+
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0 ? true : false;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return null;
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ private IPath[] findPaths(String dir, String includes, String excludes) {
+ IPath[] paths = new IPath[0];
+ try {
+ if (dir != null) {
+ DirectoryScanner scanner = DirectoryScannerFactory
+ .createDirectoryScanner(dir, null, includes, excludes,
+ null, false, 1, true);
+ if (scanner != null) {
+ String[] files = scanner.getIncludedFiles();
+ paths = new IPath[files.length];
+ for (int i = 0; i < files.length; i++) {
+ paths[i] = new Path(files[i]);
+ }
+ }
+ }
+ } catch (IllegalStateException ise) {
+ }
+ return paths;
+ }
+
+ private static void addPath(ArrayList<PathWrapper> children,
+ HashMap<String, FolderWrapper> folders, IPath path, IPath folder) {
+ try {
+ FolderWrapper fw = null;
+ if (!folders.containsKey(path.segment(0))) {
+ fw = new FolderWrapper(path.removeLastSegments(path
+ .segmentCount() - 1), folder);
+ folders.put(path.segment(0), fw);
+ children.add(fw);
+ } else {
+ fw = folders.get(path.segment(0));
+ }
+ fw.addChild(path.removeFirstSegments(1));
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+}
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetDialog.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetDialog.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetDialog.java 2008-10-31 02:09:33 UTC (rev 11379)
@@ -0,0 +1,199 @@
+package org.jboss.ide.eclipse.archives.webtools.ui;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.ide.eclipse.archives.core.asf.DirectoryScanner;
+import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory;
+import org.jboss.ide.eclipse.archives.ui.util.composites.FilesetPreviewComposite;
+import org.jboss.ide.eclipse.archives.webtools.Messages;
+
+public class FilesetDialog extends TitleAreaDialog {
+ protected Fileset fileset;
+ private String name, dir, includes, excludes;
+ private Button browse;
+ private Text includesText, excludesText, folderText, nameText;
+ private Composite main;
+ private FilesetPreviewComposite preview;
+ protected FilesetDialog(Shell parentShell, String defaultLocation) {
+ super(parentShell);
+ this.fileset = new Fileset();
+ this.fileset.setFolder(defaultLocation);
+
+ }
+ protected FilesetDialog(Shell parentShell, Fileset fileset) {
+ super(parentShell);
+ this.fileset = (Fileset)fileset.clone();
+ }
+ protected Point getInitialSize() {
+ //return new Point(400, 150);
+ Point p = super.getInitialSize();
+ return new Point(500, p.y);
+ }
+ protected int getShellStyle() {
+ return super.getShellStyle() | SWT.RESIZE;
+ }
+
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText(Messages.FilesetsNewFileset);
+ }
+
+ protected Control createDialogArea(Composite parent) {
+ setTitle(Messages.FilesetsDialogTitle);
+ setMessage(Messages.FilesetsDialogMessage);
+
+ Composite sup = (Composite) super.createDialogArea(parent);
+ main = new Composite(sup, SWT.NONE);
+ main.setLayout(new GridLayout(3, false));
+ main.setLayoutData(new GridData(GridData.FILL_BOTH));
+ fillArea(main);
+
+ nameText.setText(fileset.getName());
+ folderText.setText(fileset.getFolder());
+ includesText.setText(fileset.getIncludesPattern());
+ excludesText.setText(fileset.getExcludesPattern());
+
+ addListeners();
+ return sup;
+ }
+
+ protected void addListeners() {
+ ModifyListener mListener = new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ textModified();
+ }
+ };
+ nameText.addModifyListener(mListener);
+ folderText.addModifyListener(mListener);
+ includesText.addModifyListener(mListener);
+ excludesText.addModifyListener(mListener);
+
+ browse.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ public void widgetSelected(SelectionEvent e) {
+ DirectoryDialog d = new DirectoryDialog(new Shell());
+ d.setFilterPath(folderText.getText());
+ String x = d.open();
+ if( x != null )
+ folderText.setText(x);
+ }
+ });
+ }
+
+ protected void textModified() {
+ name = nameText.getText();
+ dir = folderText.getText();
+ includes = includesText.getText();
+ excludes = excludesText.getText();
+ fileset.setName(name);
+ fileset.setFolder(dir);
+ fileset.setIncludesPattern(includes);
+ fileset.setExcludesPattern(excludes);
+ updatePreview();
+ }
+ protected void fillArea(Composite main) {
+ Label nameLabel = new Label(main, SWT.NONE);
+ nameLabel.setText(Messages.FilesetsNewName);
+
+ nameText = new Text(main, SWT.BORDER);
+ nameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+
+ Label folderLabel = new Label(main, SWT.NONE);
+ folderLabel.setText(Messages.FilesetsNewRootDir);
+
+ folderText = new Text(main, SWT.BORDER);
+ folderText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
+ browse = new Button(main, SWT.PUSH);
+ browse.setText(Messages.FilesetsNewBrowse);
+
+ Label includesLabel = new Label(main, SWT.NONE);
+ includesLabel.setText(Messages.FilesetsNewIncludes);
+
+ includesText = new Text(main, SWT.BORDER);
+ includesText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+
+ Label excludeLabel= new Label(main, SWT.NONE);
+ excludeLabel.setText(Messages.FilesetsNewExcludes);
+
+ excludesText = new Text(main, SWT.BORDER);
+ excludesText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
+
+ Group previewWrapper = new Group(main, SWT.NONE);
+
+ previewWrapper.setLayout(new GridLayout());
+ GridLayout gridLayout = new GridLayout();
+ //gridLayout.numColumns = 3;
+ //gridLayout.verticalSpacing = 9;
+
+ GridData data = new GridData(GridData.FILL_BOTH);
+ data.grabExcessHorizontalSpace = true;
+ data.grabExcessVerticalSpace = true;
+ data.horizontalSpan = 3;
+ data.minimumHeight = 200;
+
+ previewWrapper.setLayoutData(data);
+ previewWrapper.setText(Messages.FilesetsNewPreview);
+
+ previewWrapper.setLayout(new FillLayout());
+ preview = new FilesetPreviewComposite(previewWrapper, SWT.NONE);
+ }
+
+ private void updatePreview() {
+ preview.setInput(findPaths(dir, includes, excludes));
+ }
+
+ public String getDir() {
+ return dir;
+ }
+ public String getExcludes() {
+ return excludes;
+ }
+ public String getIncludes() {
+ return includes;
+ }
+ public String getName() {
+ return name;
+ }
+ public Fileset getFileset() {
+ return fileset;
+ }
+
+
+ private static IPath[] findPaths(String dir, String includes, String excludes) {
+ IPath[] paths = new IPath[0];
+ try {
+ if( dir != null ) {
+ DirectoryScanner scanner =
+ DirectoryScannerFactory.createDirectoryScanner(dir, null, includes, excludes, null, false, 1, true);
+ if( scanner != null ) {
+ String[] files = scanner.getIncludedFiles();
+ paths = new IPath[files.length];
+ for( int i = 0; i < files.length; i++ ) {
+ paths[i] = new Path(files[i]);
+ }
+ }
+ }
+ } catch( IllegalStateException ise ) {}
+ return paths;
+ }
+
+}
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetLabelProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetLabelProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetLabelProvider.java 2008-10-31 02:09:33 UTC (rev 11379)
@@ -0,0 +1,70 @@
+package org.jboss.ide.eclipse.archives.webtools.ui;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.core.runtime.content.IContentTypeMatcher;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.ide.eclipse.archives.webtools.ui.FilesetContentProvider.FolderWrapper;
+import org.jboss.ide.eclipse.archives.webtools.ui.FilesetContentProvider.PathWrapper;
+import org.jboss.ide.eclipse.archives.webtools.ui.FilesetContentProvider.ServerWrapper;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
+
+public class FilesetLabelProvider extends LabelProvider {
+
+ private LocalResourceManager resourceManager;
+ private Image rootImage;
+ public FilesetLabelProvider() {
+ super();
+ this.resourceManager = new LocalResourceManager(JFaceResources.getResources());
+ ImageDescriptor des = ImageDescriptor.createFromURL(JBossServerUIPlugin.getDefault().getBundle().getEntry("icons/multiple_files.gif")); //$NON-NLS-1$
+ rootImage = des.createImage();
+ }
+
+ public Image getImage(Object element) {
+ if( element instanceof Fileset ) {
+ return PlatformUI.getWorkbench().getSharedImages()
+ .getImage(ISharedImages.IMG_OBJ_FOLDER);
+ } else if( element instanceof FolderWrapper ) {
+ return PlatformUI.getWorkbench().getSharedImages()
+ .getImage(ISharedImages.IMG_OBJ_FOLDER);
+ } else if( element instanceof PathWrapper ) {
+ String fileName = ((PathWrapper)element).getPath().toOSString();
+ IContentTypeManager manager = Platform.getContentTypeManager();
+ IContentTypeMatcher matcher = manager.getMatcher(null, null);
+ IContentType contentType = matcher.findContentTypeFor(fileName);
+ ImageDescriptor descriptor = PlatformUI.getWorkbench().getEditorRegistry()
+ .getImageDescriptor(fileName, contentType);
+ if (descriptor == null) {
+ descriptor = PlatformUI.getWorkbench().getSharedImages()
+ .getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
+ }
+ return resourceManager.createImage(descriptor);
+ } else if( element instanceof ServerWrapper ) {
+ return rootImage;
+ }
+ return null;
+ }
+
+ public String getText(Object element) {
+ if( element instanceof PathWrapper ) return ((PathWrapper)element).getLocalizedResourceName();
+ if( element instanceof Fileset ) return ((Fileset)element).getName() + " " + ((Fileset)element).getFolder(); //$NON-NLS-1$
+ if( element instanceof ServerWrapper ) return "Filesets"; //$NON-NLS-1$
+ return null;
+ }
+
+
+ public void dispose() {
+ resourceManager.dispose();
+ resourceManager = null;
+ rootImage.dispose();
+ super.dispose();
+ }
+
+}
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetViewProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetViewProvider.java 2008-10-30 22:32:17 UTC (rev 11378)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetViewProvider.java 2008-10-31 02:09:33 UTC (rev 11379)
@@ -44,7 +44,6 @@
import org.eclipse.core.runtime.content.IContentTypeMatcher;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.resource.LocalResourceManager;
@@ -53,24 +52,9 @@
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.ISharedImages;
@@ -82,15 +66,11 @@
import org.eclipse.ui.internal.Workbench;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.archives.core.asf.DirectoryScanner;
-import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory;
-import org.jboss.ide.eclipse.archives.ui.util.composites.FilesetPreviewComposite;
import org.jboss.ide.eclipse.archives.webtools.Messages;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.SimplePropertiesViewExtension;
/**
@@ -99,425 +79,24 @@
*
*/
public class FilesetViewProvider extends SimplePropertiesViewExtension {
+/*
- private static final String FILESET_KEY = "org.jboss.ide.eclipse.as.ui.views.server.providers.FilesetViewProvider.PropertyKey"; //$NON-NLS-1$
- private static final String HASH_SEPARATOR = "::_::"; //$NON-NLS-1$
- private Action createFilter, deleteFilter, editFilter, deleteFileAction, editFileAction;
-
private FilesetContentProvider contentProvider;
private LabelProvider labelProvider;
private Fileset[] filesets;
private Object[] selection;
- public FilesetViewProvider() {
- contentProvider = new FilesetContentProvider();
- labelProvider = new FilesetLabelProvider();
- createActions();
- }
- protected boolean supports(IServer server) {
- return server != null && (isJBossDeployable(server) || server.getRuntime() != null);
}
- protected void createActions() {
- createFilter = new Action() {
- public void run() {
- IDeployableServer server = (IDeployableServer)contentProvider.server.loadAdapter(IDeployableServer.class, new NullProgressMonitor());
- String location = null;
- if( server != null )
- location = server.getConfigDirectory();
- else
- location = contentProvider.server.getRuntime().getLocation().toOSString();
- if( location != null ) {
- FilesetDialog d = new FilesetDialog(new Shell(), location);
- if( d.open() == Window.OK ) {
- Fileset fs = d.getFileset();
- Fileset[] filesetsNew = new Fileset[filesets.length + 1];
- System.arraycopy(filesets, 0, filesetsNew, 0, filesets.length);
- filesetsNew[filesetsNew.length-1] = fs;
- filesets = filesetsNew;
- saveFilesets();
- }
- }
- }
- };
- createFilter.setText(Messages.FilesetsCreateFilter);
- deleteFilter = new Action() {
- public void run() {
- if( selection.length == 1 && selection[0] instanceof Fileset ) {
- try {
- ArrayList<Fileset> asList = new ArrayList<Fileset>(Arrays.asList(filesets));
- asList.remove(selection[0]);
- filesets = asList.toArray(new Fileset[asList.size()]);
- saveFilesets();
- } catch( Exception e ) {
- e.printStackTrace();
- }
- }
- }
- };
- deleteFilter.setText(Messages.FilesetsDeleteFilter);
- editFilter = new Action() {
- public void run() {
- Fileset sel = selection.length == 1 && selection[0] instanceof Fileset ? (Fileset)selection[0] : null;
- if( sel == null ) return;
- FilesetDialog d = new FilesetDialog(new Shell(), sel);
- if( d.open() == Window.OK ) {
- Fileset ret = d.getFileset();
- sel.setName(ret.getName());
- sel.setFolder(ret.getFolder());
- sel.setIncludesPattern(ret.getIncludesPattern());
- sel.setExcludesPattern(ret.getExcludesPattern());
- saveFilesets();
- }
- }
- };
- editFilter.setText(Messages.FilesetsEditFilter);
- deleteFileAction = new Action() {
- public void run() {
- try {
- Shell shell = Workbench.getInstance().getActiveWorkbenchWindow().getShell();
- File[] files = getSelectedFiles();
- MessageBox mb = new MessageBox(shell,SWT.ICON_QUESTION | SWT.OK | SWT.CANCEL);
- mb.setText(Messages.DeleteFiles);
- mb.setMessage(Messages.DeleteFilesMessage);
- if( mb.open() == SWT.OK) {
- for( int i = 0; i < files.length; i++ )
- FileUtil.safeDelete(files[i]);
- refreshViewer();
- }
- } catch( Exception e ) {
- }
- }
- };
- deleteFileAction.setText(Messages.FilesetsDeleteFile);
- editFileAction = new Action() {
- public void run() {
- File[] files = getSelectedFiles();
- IWorkbench wb = PlatformUI.getWorkbench();
- IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
- IWorkbenchPage page = win.getActivePage();
- for( int i = 0; i < files.length; i++ ) {
- try {
- IFile eclipseFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(files[i].getAbsolutePath()));
- IFileStore fileStore= EFS.getLocalFileSystem().fromLocalFile(files[i]);
- if( eclipseFile != null ) {
- IEditorInput input = new FileEditorInput(eclipseFile);
- IEditorDescriptor desc = PlatformUI.getWorkbench().
- getEditorRegistry().getDefaultEditor(files[i].getName());
- if( desc != null )
- page.openEditor(input, desc.getId());
- } else if( fileStore != null ){
- IEditorInput input = new FileStoreEditorInput(fileStore);
- IEditorDescriptor desc = PlatformUI.getWorkbench().
- getEditorRegistry().getDefaultEditor(files[i].getName());
- if( desc != null )
- page.openEditor(input, desc.getId());
- }
- } catch( Exception e ) {
- IStatus status = new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, Messages.FilesetsCannotOpenFile, e);
- JBossServerUIPlugin.getDefault().getLog().log(status);
- }
- }
- }
- };
- editFileAction.setText(Messages.FilesetsEditFile);
- }
- protected File[] getSelectedFiles() {
- ArrayList<File> tmp = new ArrayList<File>();
- for( int i = 0; i < selection.length; i++ ) {
- tmp.add(((PathWrapper)selection[i]).getPath().toFile());
- }
- return (File[]) tmp.toArray(new File[tmp.size()]);
- }
- public static class PathWrapper {
- private IPath path;
- private IPath folder;
- public PathWrapper(IPath path, IPath folder) {
- this.path = path;
- this.folder = folder;
- }
- /**
- * @return the folder
- */
- public IPath getFolder() {
- return folder;
- }
- /**
- * @return the path
- */
- public IPath getPath() {
- return folder.append(path);
- }
- public String getLocalizedResourceName() {
- return path.toOSString();
- }
- }
- public static class FolderWrapper extends PathWrapper {
- private HashMap<String, FolderWrapper> childrenFolders;
- private ArrayList<PathWrapper> children;
- public FolderWrapper(IPath path, IPath folder) {
- super(path, folder);
- children = new ArrayList<PathWrapper>();
- childrenFolders = new HashMap<String, FolderWrapper>();
- }
- public void addChild(IPath path) {
- if( path.segmentCount() == 1 ) {
- children.add(new PathWrapper(path, getFolder().append(getLocalizedResourceName())));
- } else {
- addPath(children, childrenFolders, path, getFolder().append(getLocalizedResourceName()));
- }
- }
- public Object[] getChildren() {
- return children.toArray(new Object[children.size()]);
- }
- }
- private static void addPath(ArrayList<PathWrapper> children, HashMap<String, FolderWrapper> folders, IPath path, IPath folder) {
- try {
- FolderWrapper fw = null;
- if( !folders.containsKey(path.segment(0))) {
- fw = new FolderWrapper(path.removeLastSegments(path.segmentCount()-1), folder);
- folders.put(path.segment(0), fw);
- children.add(fw);
- } else {
- fw = folders.get( path.segment(0));
- }
- fw.addChild(path.removeFirstSegments(1));
- } catch( Exception e ) {
- e.printStackTrace();
- }
- }
- public class FilesetContentProvider implements ITreeContentProvider {
- public IServer server;
- public Object[] getChildren(Object parentElement) {
- if( parentElement instanceof ServerViewProvider ) {
- return filesets == null ? new Object[]{} : filesets;
- } else if( parentElement instanceof Fileset ) {
- Fileset fs = (Fileset)parentElement;
- IPath[] paths = null;
- try {
- paths = findPaths(fs.getFolder(),
- fs.getIncludesPattern(),
- fs.getExcludesPattern());
- } catch( BuildException be ) {
- return new Object[]{};
- }
- HashMap<String, FolderWrapper> folders = new HashMap<String, FolderWrapper>();
- ArrayList<PathWrapper> wrappers = new ArrayList<PathWrapper>();
- for( int i = 0; i < paths.length; i++ ) {
- if( paths[i].segmentCount() == 1 ) {
- wrappers.add(new PathWrapper(paths[i], new Path(fs.getFolder())));
- } else {
- addPath(wrappers, folders, paths[i], new Path(fs.getFolder()));
- }
- }
- return wrappers.toArray(new Object[wrappers.size()]);
- } else if( parentElement instanceof FolderWrapper ) {
- return ((FolderWrapper)parentElement).getChildren();
- }
- return new Object[0];
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return getChildren(element).length > 0 ? true : false;
- }
-
- public Object[] getElements(Object inputElement) {
- return null;
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if( newInput instanceof IServer ) {
- server = (IServer)newInput;
- loadFilesets();
- }
- }
- }
-
- public void loadFilesets() {
- IServer server = contentProvider.server;
- if( server != null ) {
- ServerAttributeHelper helper = ServerAttributeHelper.createHelper(server);
- List tmp = helper.getAttribute(FILESET_KEY, new ArrayList());
- String[] asStrings = (String[]) tmp.toArray(new String[tmp.size()]);
- filesets = new Fileset[asStrings.length];
- for( int i = 0; i < asStrings.length; i++ ) {
- filesets[i] = new Fileset(asStrings[i]);
- }
- }
- }
-
- public void saveFilesets() {
- IServer server = contentProvider.server;
- if( server != null ) {
- ArrayList<String> list = new ArrayList<String>();
- for( int i = 0; i < filesets.length; i++ ) {
- list.add(filesets[i].toString());
- }
- ServerAttributeHelper helper = ServerAttributeHelper.createHelper(server);
- helper.setAttribute(FILESET_KEY, list);
- helper.save();
- }
- }
-
- public class Fileset implements Cloneable {
- private String name, folder, includesPattern, excludesPattern;
- public Fileset() {
- }
- public Fileset(String string) {
- try {
- name = folder = includesPattern =excludesPattern = ""; //$NON-NLS-1$
- String[] parts = string.split("\n"); //$NON-NLS-1$
- name = parts[0];
- folder = parts[1];
- includesPattern = parts[2];
- excludesPattern = parts[3];
- } catch( ArrayIndexOutOfBoundsException aioobe) {}
- }
-
- public Fileset(String name, String folder, String inc, String exc) {
- this.name = name;
- this.folder = folder;
- includesPattern = inc;
- excludesPattern = exc;
- }
- public String toString() {
- return name + "\n" + folder + "\n" + includesPattern + "\n" + excludesPattern; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
- }
- /**
- * @return the folder
- */
- public String getFolder() {
- return folder == null ? "" : folder; //$NON-NLS-1$
- }
- /**
- * @return the name
- */
- public String getName() {
- return name == null ? "" : name; //$NON-NLS-1$
- }
- /**
- * @return the excludesPattern
- */
- public String getExcludesPattern() {
- return excludesPattern == null ? "" : excludesPattern; //$NON-NLS-1$
- }
- /**
- * @return the includesPattern
- */
- public String getIncludesPattern() {
- return includesPattern == null ? "" : includesPattern; //$NON-NLS-1$
- }
-
- /**
- * @param excludesPattern the excludesPattern to set
- */
- public void setExcludesPattern(String excludesPattern) {
- this.excludesPattern = excludesPattern;
- }
-
- /**
- * @param folder the folder to set
- */
- public void setFolder(String folder) {
- this.folder = folder;
- }
-
- /**
- * @param includesPattern the includesPattern to set
- */
- public void setIncludesPattern(String includesPattern) {
- this.includesPattern = includesPattern;
- }
-
- /**
- * @param name the name to set
- */
- public void setName(String name) {
- this.name = name;
- }
-
- public Object clone() {
- try {
- return super.clone();
- } catch( Exception e ) {}
- return null;
- }
-
- public boolean equals(Object other) {
- if( !(other instanceof Fileset)) return false;
- if( other == this ) return true;
- Fileset o = (Fileset)other;
- return o.getName().equals(getName()) && o.getFolder().equals(getFolder())
- && o.getIncludesPattern().equals(getIncludesPattern()) && o.getExcludesPattern().equals(getExcludesPattern());
- }
- public int hashCode() {
- return (name + HASH_SEPARATOR + folder + HASH_SEPARATOR + includesPattern + HASH_SEPARATOR + excludesPattern + HASH_SEPARATOR).hashCode();
- }
- }
-
- public class FilesetLabelProvider extends LabelProvider {
-
- private LocalResourceManager resourceManager;
-
- public FilesetLabelProvider() {
- super();
- this.resourceManager = new LocalResourceManager(JFaceResources.getResources());
- }
-
- public Image getImage(Object element) {
- if( element instanceof Fileset ) {
- return PlatformUI.getWorkbench().getSharedImages()
- .getImage(ISharedImages.IMG_OBJ_FOLDER);
- } else if( element instanceof FolderWrapper ) {
- return PlatformUI.getWorkbench().getSharedImages()
- .getImage(ISharedImages.IMG_OBJ_FOLDER);
- } else if( element instanceof PathWrapper ) {
- String fileName = ((PathWrapper)element).getPath().toOSString();
- IContentTypeManager manager = Platform.getContentTypeManager();
- IContentTypeMatcher matcher = manager.getMatcher(null, null);
- IContentType contentType = matcher.findContentTypeFor(fileName);
- ImageDescriptor descriptor = PlatformUI.getWorkbench().getEditorRegistry()
- .getImageDescriptor(fileName, contentType);
- if (descriptor == null) {
- descriptor = PlatformUI.getWorkbench().getSharedImages()
- .getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
- }
- return resourceManager.createImage(descriptor);
- }
- return null;
- }
-
- public String getText(Object element) {
- if( element instanceof PathWrapper ) return ((PathWrapper)element).getLocalizedResourceName();
- if( element instanceof Fileset ) return ((Fileset)element).getName() + " " + ((Fileset)element).getFolder(); //$NON-NLS-1$
- return element == null ? "" : element.toString();//$NON-NLS-1$
- }
-
-
- public void dispose() {
- resourceManager.dispose();
- resourceManager = null;
- super.dispose();
- }
-
- }
-
public void fillContextMenu(Shell shell, IMenuManager menu, Object[] selection) {
this.selection = selection;
if( selection.length == 1 && selection[0] instanceof ServerViewProvider ) {
@@ -533,27 +112,8 @@
}
}
- protected boolean allPathWrappers(Object[] list) {
- boolean result = true;
- for( int i = 0; i < list.length; i++ )
- result &= list[i] instanceof PathWrapper;
- return result;
- }
- protected boolean canDelete(Object[] list ) {
- boolean result = true;
- for( int i = 0; i < list.length; i++ )
- result &= ((PathWrapper)selection[i]).getPath().toFile().exists();
- return result;
- }
- protected boolean canEdit(Object[] list) {
- for( int i = 0; i < list.length; i++ )
- if( canEdit(((PathWrapper)selection[i]).getPath().toFile()))
- return true;
- return false;
- }
-
protected boolean canEdit(File file) {
IFile eclipseFile = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(new Path(file.getAbsolutePath()));
IFileStore fileStore= EFS.getLocalFileSystem().fromLocalFile(file);
@@ -590,176 +150,6 @@
return null;
}
- private IPath[] findPaths(String dir, String includes, String excludes) {
- IPath[] paths = new IPath[0];
- try {
- if( dir != null ) {
- DirectoryScanner scanner =
- DirectoryScannerFactory.createDirectoryScanner(dir, null, includes, excludes, null, false, 1, true);
- if( scanner != null ) {
- String[] files = scanner.getIncludedFiles();
- paths = new IPath[files.length];
- for( int i = 0; i < files.length; i++ ) {
- paths[i] = new Path(files[i]);
- }
- }
- }
- } catch( IllegalStateException ise ) {}
- return paths;
- }
- protected class FilesetDialog extends TitleAreaDialog {
- protected Fileset fileset;
- private String name, dir, includes, excludes;
- private Button browse;
- private Text includesText, excludesText, folderText, nameText;
- private Composite main;
- private FilesetPreviewComposite preview;
- protected FilesetDialog(Shell parentShell, String defaultLocation) {
- super(parentShell);
- this.fileset = new Fileset();
- this.fileset.setFolder(defaultLocation);
-
- }
- protected FilesetDialog(Shell parentShell, Fileset fileset) {
- super(parentShell);
- this.fileset = (Fileset)fileset.clone();
- }
- protected Point getInitialSize() {
- //return new Point(400, 150);
- Point p = super.getInitialSize();
- return new Point(500, p.y);
- }
- protected int getShellStyle() {
- return super.getShellStyle() | SWT.RESIZE;
- }
-
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(Messages.FilesetsNewFileset);
- }
-
- protected Control createDialogArea(Composite parent) {
- setTitle(Messages.FilesetsDialogTitle);
- setMessage(Messages.FilesetsDialogMessage);
-
- Composite sup = (Composite) super.createDialogArea(parent);
- main = new Composite(sup, SWT.NONE);
- main.setLayout(new GridLayout(3, false));
- main.setLayoutData(new GridData(GridData.FILL_BOTH));
- fillArea(main);
-
- nameText.setText(fileset.getName());
- folderText.setText(fileset.getFolder());
- includesText.setText(fileset.getIncludesPattern());
- excludesText.setText(fileset.getExcludesPattern());
-
- addListeners();
- return sup;
- }
-
- protected void addListeners() {
- ModifyListener mListener = new ModifyListener() {
- public void modifyText(ModifyEvent e) {
- textModified();
- }
- };
- nameText.addModifyListener(mListener);
- folderText.addModifyListener(mListener);
- includesText.addModifyListener(mListener);
- excludesText.addModifyListener(mListener);
-
- browse.addSelectionListener(new SelectionListener() {
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- public void widgetSelected(SelectionEvent e) {
- DirectoryDialog d = new DirectoryDialog(new Shell());
- d.setFilterPath(folderText.getText());
- String x = d.open();
- if( x != null )
- folderText.setText(x);
- }
- });
- }
-
- protected void textModified() {
- name = nameText.getText();
- dir = folderText.getText();
- includes = includesText.getText();
- excludes = excludesText.getText();
- fileset.setName(name);
- fileset.setFolder(dir);
- fileset.setIncludesPattern(includes);
- fileset.setExcludesPattern(excludes);
- updatePreview();
- }
- protected void fillArea(Composite main) {
- Label nameLabel = new Label(main, SWT.NONE);
- nameLabel.setText(Messages.FilesetsNewName);
-
- nameText = new Text(main, SWT.BORDER);
- nameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
-
- Label folderLabel = new Label(main, SWT.NONE);
- folderLabel.setText(Messages.FilesetsNewRootDir);
-
- folderText = new Text(main, SWT.BORDER);
- folderText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
- browse = new Button(main, SWT.PUSH);
- browse.setText(Messages.FilesetsNewBrowse);
-
- Label includesLabel = new Label(main, SWT.NONE);
- includesLabel.setText(Messages.FilesetsNewIncludes);
-
- includesText = new Text(main, SWT.BORDER);
- includesText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
-
- Label excludeLabel= new Label(main, SWT.NONE);
- excludeLabel.setText(Messages.FilesetsNewExcludes);
-
- excludesText = new Text(main, SWT.BORDER);
- excludesText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));
-
- Group previewWrapper = new Group(main, SWT.NONE);
-
- previewWrapper.setLayout(new GridLayout());
- GridLayout gridLayout = new GridLayout();
- //gridLayout.numColumns = 3;
- //gridLayout.verticalSpacing = 9;
-
- GridData data = new GridData(GridData.FILL_BOTH);
- data.grabExcessHorizontalSpace = true;
- data.grabExcessVerticalSpace = true;
- data.horizontalSpan = 3;
- data.minimumHeight = 200;
-
- previewWrapper.setLayoutData(data);
- previewWrapper.setText(Messages.FilesetsNewPreview);
-
- previewWrapper.setLayout(new FillLayout());
- preview = new FilesetPreviewComposite(previewWrapper, SWT.NONE);
- }
-
- private void updatePreview() {
- preview.setInput(findPaths(dir, includes, excludes));
- }
-
- public String getDir() {
- return dir;
- }
- public String getExcludes() {
- return excludes;
- }
- public String getIncludes() {
- return includes;
- }
- public String getName() {
- return name;
- }
- public Fileset getFileset() {
- return fileset;
- }
-
- }
-
+*/
}
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerActionMessages.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerActionMessages.java 2008-10-30 22:32:17 UTC (rev 11378)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerActionMessages.java 2008-10-31 02:09:33 UTC (rev 11379)
@@ -3,7 +3,7 @@
import org.eclipse.osgi.util.NLS;
public class ServerActionMessages extends NLS {
- private static final String BUNDLE_NAME = "org.jboss.tools.as.wst.server.ui.action.messages";
+ private static final String BUNDLE_NAME = "org.jboss.ide.eclipse.as.ui.actions.messages";
static {
// load message values from bundle file
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogContentProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogContentProvider.java 2008-10-30 22:32:17 UTC (rev 11378)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogContentProvider.java 2008-10-31 02:09:33 UTC (rev 11379)
@@ -29,10 +29,11 @@
public static final int _FALSE_ = 2;
private Viewer viewer;
+ private IEventLogListener listener;
public EventLogContentProvider() {
EventLogModel.enableLogging();
- EventLogModel.getDefault().addListener(new IEventLogListener() {
+ listener = new IEventLogListener() {
public void eventModelChanged(String serverId,
EventLogTreeItem changed) {
if( viewer instanceof StructuredViewer ) {
@@ -46,7 +47,8 @@
}
}
}
- });
+ };
+ EventLogModel.getDefault().addListener(listener);
}
public Object[] getChildren(Object parentElement) {
@@ -143,6 +145,7 @@
public void dispose() {
EventLogModel.disableLogging();
+ EventLogModel.getDefault().removeListener(listener);
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerContentProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerContentProvider.java 2008-10-30 22:32:17 UTC (rev 11378)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerContentProvider.java 2008-10-31 02:09:33 UTC (rev 11379)
@@ -132,7 +132,13 @@
}
public void dispose() {
- // do nothing
+ // remove all listeners!
+ ServerCore.removeServerLifecycleListener(serverResourceListener);
+ IServer[] servers = ServerCore.getServers();
+ for( int i = 0;i < servers.length; i++ ) {
+ servers[i].removePublishListener(publishListener);
+ servers[i].removeServerListener(serverListener);
+ }
}
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2008-10-30 22:32:17 UTC (rev 11378)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2008-10-31 02:09:33 UTC (rev 11379)
@@ -94,16 +94,7 @@
typeIds="jboss.singlefile"/>
</extension>
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.wst.server.ui.preferencePage"
- class="org.jboss.tools.as.wst.server.ui.views.server.preferencepages.ViewPreferencePage"
- id="org.jboss.ide.eclipse.as.ui.jbossServerViewPrefPage"
- name="JBoss Server View"/>
- </extension>
-
<extension point="org.eclipse.wst.common.project.facet.core.runtimes">
<adapter>
<runtime-component id="org.jboss.ide.eclipse.as.runtime.component"/>
16 years, 2 months
JBoss Tools SVN: r11378 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-30 18:32:17 -0400 (Thu, 30 Oct 2008)
New Revision: 11378
Added:
workspace/snjeza/seam-examples/jboss-seam-booking.zip
Log:
JBIDE-3031 Project examples (Seam Booking) don't start on server.
Added: workspace/snjeza/seam-examples/jboss-seam-booking.zip
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/seam-examples/jboss-seam-booking.zip
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 2 months
JBoss Tools SVN: r11377 - trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-30 18:17:16 -0400 (Thu, 30 Oct 2008)
New Revision: 11377
Modified:
trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
Log:
https://jira.jboss.org/jira/browse/JBDS-461 fixed
Modified: trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 22:12:51 UTC (rev 11376)
+++ trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 22:17:16 UTC (rev 11377)
@@ -168,7 +168,7 @@
jbossASLocation = jbossASLocation.trim();
- IRuntimeWorkingCopy runtime = null;
+ IRuntime runtime = null;
IProgressMonitor progressMonitor = new NullProgressMonitor();
if (runtime == null) {
runtime = createRuntime(name + " Runtime", jbossASLocation, progressMonitor, index);
@@ -200,7 +200,7 @@
}
}
- IRuntimeWorkingCopy runtime = null;
+ IRuntime runtime = null;
IRuntime[] runtimes = ServerCore.getRuntimes();
for (int i = 0; i < runtimes.length; i++) {
if (runtimes[0].getLocation().equals(jbossASLocation)) {
@@ -240,7 +240,7 @@
* @throws ConnectionProfileException
*/
public static IServerWorkingCopy initJBossAS(String jbossASLocation, IProgressMonitor progressMonitor) throws CoreException, ConnectionProfileException {
- IRuntimeWorkingCopy runtime = createRuntime(null, jbossASLocation, progressMonitor, 2);
+ IRuntime runtime = createRuntime(null, jbossASLocation, progressMonitor, 2);
IServerWorkingCopy server = null;
if (runtime != null) {
server = createServer(progressMonitor, runtime, 2, null);
@@ -256,7 +256,7 @@
* @return runtime working copy
* @throws CoreException
*/
- private static IRuntimeWorkingCopy createRuntime(String runtimeName, String jbossASLocation, IProgressMonitor progressMonitor, int index) throws CoreException {
+ private static IRuntime createRuntime(String runtimeName, String jbossASLocation, IProgressMonitor progressMonitor, int index) throws CoreException {
IRuntimeWorkingCopy runtime = null;
String type = null;
String version = null;
@@ -277,7 +277,7 @@
// IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME
((RuntimeWorkingCopy) runtime).setAttribute("org.jboss.ide.eclipse.as.core.runtime.configurationName", JBOSS_AS_DEFAULT_CONFIGURATION_NAME);
- runtime.save(false, progressMonitor);
+ return runtime.save(false, progressMonitor);
}
return runtime;
}
@@ -289,7 +289,7 @@
* @return server working copy
* @throws CoreException
*/
- private static IServerWorkingCopy createServer(IProgressMonitor progressMonitor, IRuntimeWorkingCopy runtime, int index, String name) throws CoreException {
+ private static IServerWorkingCopy createServer(IProgressMonitor progressMonitor, IRuntime runtime, int index, String name) throws CoreException {
IServerType serverType = ServerCore.findServerType(JBOSS_AS_TYPE_ID[index]);
IServerWorkingCopy server = serverType.createServer(null, null, runtime, progressMonitor);
16 years, 2 months
JBoss Tools SVN: r11376 - branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-30 18:12:51 -0400 (Thu, 30 Oct 2008)
New Revision: 11376
Modified:
branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
Log:
https://jira.jboss.org/jira/browse/JBDS-461 fixed
Modified: branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 22:00:31 UTC (rev 11375)
+++ branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 22:12:51 UTC (rev 11376)
@@ -168,11 +168,8 @@
jbossASLocation = jbossASLocation.trim();
- IRuntimeWorkingCopy runtime = null;
IProgressMonitor progressMonitor = new NullProgressMonitor();
- if (runtime == null) {
- runtime = createRuntime(name + " Runtime", jbossASLocation, progressMonitor, index);
- }
+ IRuntime runtime = createRuntime(jbossASLocation, progressMonitor, index, name + " Runtime");
if (runtime != null) {
createServer(progressMonitor, runtime, index, name);
}
@@ -200,7 +197,7 @@
}
}
- IRuntimeWorkingCopy runtime = null;
+ IRuntime runtime = null;
IRuntime[] runtimes = ServerCore.getRuntimes();
for (int i = 0; i < runtimes.length; i++) {
if (runtimes[0].getLocation().equals(jbossASLocation)) {
@@ -211,7 +208,7 @@
IProgressMonitor progressMonitor = new NullProgressMonitor();
if (runtime == null) {
- runtime = createRuntime(null, jbossASLocation, progressMonitor, 2);
+ runtime = createRuntime(jbossASLocation, progressMonitor, 2,null);
}
if (runtime != null) {
createServer(progressMonitor, runtime, 2, null);
@@ -240,7 +237,7 @@
* @throws ConnectionProfileException
*/
public static IServerWorkingCopy initJBossAS(String jbossASLocation, IProgressMonitor progressMonitor) throws CoreException, ConnectionProfileException {
- IRuntimeWorkingCopy runtime = createRuntime(null, jbossASLocation, progressMonitor, 2);
+ IRuntime runtime = createRuntime(jbossASLocation, progressMonitor, 2, null);
IServerWorkingCopy server = null;
if (runtime != null) {
server = createServer(progressMonitor, runtime, 2, null);
@@ -256,7 +253,7 @@
* @return runtime working copy
* @throws CoreException
*/
- private static IRuntimeWorkingCopy createRuntime(String runtimeName, String jbossASLocation, IProgressMonitor progressMonitor, int index) throws CoreException {
+ private static IRuntime createRuntime(String jbossASLocation, IProgressMonitor progressMonitor, int index, String name) throws CoreException {
IRuntimeWorkingCopy runtime = null;
String type = null;
String version = null;
@@ -266,8 +263,8 @@
if (runtimeTypes.length > 0) {
runtime = runtimeTypes[0].createRuntime(runtimeId, progressMonitor);
runtime.setLocation(jbossAsLocationPath);
- if(runtimeName!=null) {
- runtime.setName(runtimeName);
+ if(name != null) {
+ ((RuntimeWorkingCopy) runtime).setAttribute(RuntimeWorkingCopy.PROPERTY_NAME,name);
}
IVMInstall defaultVM = JavaRuntime.getDefaultVMInstall();
// IJBossServerRuntime.PROPERTY_VM_ID
@@ -276,10 +273,10 @@
((RuntimeWorkingCopy) runtime).setAttribute("PROPERTY_VM_TYPE_ID", defaultVM.getVMInstallType().getId());
// IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME
((RuntimeWorkingCopy) runtime).setAttribute("org.jboss.ide.eclipse.as.core.runtime.configurationName", JBOSS_AS_DEFAULT_CONFIGURATION_NAME);
-
- runtime.save(false, progressMonitor);
+
+ return runtime.save(false, progressMonitor);
}
- return runtime;
+ return null;
}
/**
@@ -289,7 +286,7 @@
* @return server working copy
* @throws CoreException
*/
- private static IServerWorkingCopy createServer(IProgressMonitor progressMonitor, IRuntimeWorkingCopy runtime, int index, String name) throws CoreException {
+ private static IServerWorkingCopy createServer(IProgressMonitor progressMonitor, IRuntime runtime, int index, String name) throws CoreException {
IServerType serverType = ServerCore.findServerType(JBOSS_AS_TYPE_ID[index]);
IServerWorkingCopy server = serverType.createServer(null, null, runtime, progressMonitor);
16 years, 2 months
JBoss Tools SVN: r11375 - workspace/examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-30 18:00:31 -0400 (Thu, 30 Oct 2008)
New Revision: 11375
Modified:
workspace/examples/projectExamples.xml
Log:
JBIDE-3031 Project examples (Seam Booking) don't start on server.
Modified: workspace/examples/projectExamples.xml
===================================================================
--- workspace/examples/projectExamples.xml 2008-10-30 20:53:51 UTC (rev 11374)
+++ workspace/examples/projectExamples.xml 2008-10-30 22:00:31 UTC (rev 11375)
@@ -37,6 +37,20 @@
<project>
<category>Seam</category>
+ <name>jboss-seam-booking</name>
+ <shortDescription>Seam Booking Example - WAR Standalone</shortDescription>
+ <description>This example demonstrates the use of Seam in a Java EE 5 environment.
+Transaction and persistence context management is handled by the EJB container.
+This example can also run in Tomcat with JBoss Embedded.
+</description>
+ <size>5491000</size>
+ <url>
+ http://anonsvn.jboss.org/repos/jbosstools/workspace/snjeza/seam-examples/...
+ </url>
+ </project>
+
+ <project>
+ <category>Seam</category>
<name>booking</name>
<shortDescription>Seam Booking Example - WAR</shortDescription>
<description>This example demonstrates the use of Seam in a Java EE 5 environment.
16 years, 2 months
JBoss Tools SVN: r11374 - 21.10.2008 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2008-10-30 16:53:51 -0400 (Thu, 30 Oct 2008)
New Revision: 11374
Added:
trunk/documentation/qa/reports/Tests 21.10.2008/Portlets_29.10.2008.htm
Log:
Added a file remotely
Added: trunk/documentation/qa/reports/Tests 21.10.2008/Portlets_29.10.2008.htm
===================================================================
--- trunk/documentation/qa/reports/Tests 21.10.2008/Portlets_29.10.2008.htm (rev 0)
+++ trunk/documentation/qa/reports/Tests 21.10.2008/Portlets_29.10.2008.htm 2008-10-30 20:53:51 UTC (rev 11374)
@@ -0,0 +1,200 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD><TITLE>Portlets tests</TITLE>
+<STYLE>H1 {
+ COLOR: #4a5d75; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+H2 {
+ COLOR: #4a5d75; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+TR {
+ BACKGROUND-COLOR: #f5f5f5
+}
+TD {
+ BORDER-RIGHT: dimgray 1px solid; PADDING-RIGHT: 0.5em; BORDER-TOP: dimgray 1px solid; PADDING-LEFT: 0.5em; PADDING-BOTTOM: 0.15em; BORDER-LEFT: dimgray 1px solid; PADDING-TOP: 0.15em; BORDER-BOTTOM: dimgray 1px solid; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+HR {
+ COLOR: #999; BORDER-COLLAPSE: collapse
+}
+BODY {
+ PADDING-RIGHT: 2em; PADDING-LEFT: 2em; FONT-SIZE: 12px; PADDING-BOTTOM: 0em; COLOR: #333; LINE-HEIGHT: 100%; PADDING-TOP: 0em; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; max-width: 55em
+}
+TABLE {
+ BORDER-RIGHT: dimgray 0px solid; BORDER-TOP: dimgray 0px solid; BORDER-LEFT: dimgray 0px solid; COLOR: #4a5d75; BORDER-BOTTOM: dimgray 0px solid; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif
+}
+</STYLE>
+
+<META http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
+<BODY bgColor=#f5f5f5>
+<CENTER>
+<H1>Portlets tests</H1>
+<TABLE
+style="BORDER-TOP-WIDTH: 1pt; BORDER-LEFT-WIDTH: 1pt; BORDER-BOTTOM-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"
+cellSpacing=0 cellPadding=4 width="100%" align=center>
+ <TBODY>
+ <TR bgColor=gray>
+ <TD><B>Plan: Test Name</B></TD>
+ <TD><B>Status</B></TD>
+ <TD><B>Bug Number</B></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 01 Creating
+ test Seam war project with portlets</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 02 Creating
+ test Seam ear project with portlets</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 04 Creating
+ Dynamic Web Project JSF+Portlets</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 03 Creating
+ Dynamic Web Project only Portlets</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 05 Creating
+ sample Java Portlet for Portlets projects</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 06 Creating
+ sample JSF Portlet for JSF Portlets projects</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 07 Creating
+ sample Seam Portlet for Seam Portlets projects</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 09 Running
+ Seam war and ear projects on server</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 10 Running
+ Dynamic Web projects on server</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 11 Running
+ Dynamic Web JSF projects on server</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 12 Running
+ Java Portlet on server</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 13 Running
+ JSF Portlet on server</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 14 Running
+ Seam Portlet on server</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 08 JBoss
+ Portal server runtime selection</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 15 Hot
+ deploy for Java Portlets</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 16 Hot
+ deploy for JSF Portlets</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 17 Hot
+ deploy for Seam Portlets</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 18 Java
+ Portlet creation wizard test</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 19 JSF and
+ Seam Portlet creation wizard test</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 20 Importing
+ Portlets test projects</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 21 Running
+ Portlets test projects on Portal Server</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 23 Portlets
+ changing</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> 22 Running
+ test Portlets on server.</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white
+size=1> </FONT></TD></TR></TBODY></TABLE></CENTER></BODY></HTML>
16 years, 2 months
JBoss Tools SVN: r11373 - 21.10.2008 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: anis
Date: 2008-10-30 16:53:37 -0400 (Thu, 30 Oct 2008)
New Revision: 11373
Added:
trunk/documentation/qa/reports/Tests 21.10.2008/ImportStruts_29.10.2008.htm
Log:
Added a file remotely
Added: trunk/documentation/qa/reports/Tests 21.10.2008/ImportStruts_29.10.2008.htm
===================================================================
--- trunk/documentation/qa/reports/Tests 21.10.2008/ImportStruts_29.10.2008.htm (rev 0)
+++ trunk/documentation/qa/reports/Tests 21.10.2008/ImportStruts_29.10.2008.htm 2008-10-30 20:53:37 UTC (rev 11373)
@@ -0,0 +1,67 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML><HEAD><TITLE>Import Struts Projects</TITLE>
+<STYLE>H1 {
+ COLOR: #4a5d75; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+H2 {
+ COLOR: #4a5d75; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+TR {
+ BACKGROUND-COLOR: #f5f5f5
+}
+TD {
+ BORDER-RIGHT: dimgray 1px solid; PADDING-RIGHT: 0.5em; BORDER-TOP: dimgray 1px solid; PADDING-LEFT: 0.5em; PADDING-BOTTOM: 0.15em; BORDER-LEFT: dimgray 1px solid; PADDING-TOP: 0.15em; BORDER-BOTTOM: dimgray 1px solid; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; BACKGROUND-COLOR: transparent
+}
+HR {
+ COLOR: #999; BORDER-COLLAPSE: collapse
+}
+BODY {
+ PADDING-RIGHT: 2em; PADDING-LEFT: 2em; FONT-SIZE: 12px; PADDING-BOTTOM: 0em; COLOR: #333; LINE-HEIGHT: 100%; PADDING-TOP: 0em; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; max-width: 55em
+}
+TABLE {
+ BORDER-RIGHT: dimgray 0px solid; BORDER-TOP: dimgray 0px solid; BORDER-LEFT: dimgray 0px solid; COLOR: #4a5d75; BORDER-BOTTOM: dimgray 0px solid; FONT-FAMILY: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif
+}
+</STYLE>
+
+<META http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
+<BODY bgColor=#f5f5f5>
+<CENTER>
+<H1>Import Struts Projects</H1>
+<TABLE
+style="BORDER-TOP-WIDTH: 1pt; BORDER-LEFT-WIDTH: 1pt; BORDER-BOTTOM-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"
+cellSpacing=0 cellPadding=4 width="100%" align=center>
+ <TBODY>
+ <TR bgColor=gray>
+ <TD><B>Plan: Test Name</B></TD>
+ <TD><B>Status</B></TD>
+ <TD><B>Bug Number</B></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> Create
+ Struts Project(Kickstart)</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> Export
+ Struts Project to WAR file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=papayawhip>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> Import
+ Struts Project from WAR file</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white size=1> </FONT></TD></TR>
+ <TR bgColor=seashell>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"> Import
+ Struts Project</TD>
+ <TD
+ style="BORDER-TOP-WIDTH: 1pt; COLOR: green; BORDER-RIGHT-WIDTH: 1pt">Passed</TD>
+ <TD style="BORDER-TOP-WIDTH: 1pt; BORDER-RIGHT-WIDTH: 1pt"><FONT
+ color=white
+size=1> </FONT></TD></TR></TBODY></TABLE></CENTER></BODY></HTML>
16 years, 2 months