[overlord-commits] Overlord SVN: r937 - in bpm-console/trunk/gui/war: scripts and 2 other directories.
overlord-commits at lists.jboss.org
overlord-commits at lists.jboss.org
Tue Jan 26 09:54:44 EST 2010
Author: heiko.braun at jboss.com
Date: 2010-01-26 09:54:44 -0500 (Tue, 26 Jan 2010)
New Revision: 937
Added:
bpm-console/trunk/gui/war/scripts/
bpm-console/trunk/gui/war/scripts/antrun-version.xml
Removed:
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java
Modified:
bpm-console/trunk/gui/war/pom.xml
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml
bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java
Log:
Remove dependency on bpm workspace module and API
Modified: bpm-console/trunk/gui/war/pom.xml
===================================================================
--- bpm-console/trunk/gui/war/pom.xml 2010-01-26 14:31:13 UTC (rev 936)
+++ bpm-console/trunk/gui/war/pom.xml 2010-01-26 14:54:44 UTC (rev 937)
@@ -43,20 +43,6 @@
<dependency>
<groupId>org.jboss.bpm</groupId>
- <artifactId>gwt-console-workspace-api</artifactId>
- <version>${version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.bpm</groupId>
- <artifactId>gwt-console-workspace-api</artifactId>
- <classifier>sources</classifier>
- <version>${version}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.bpm</groupId>
<artifactId>gwt-console-rpc</artifactId>
<classifier>sources</classifier>
<version>${version}</version>
@@ -255,6 +241,25 @@
<goal>run</goal>
</goals>
</execution>
+
+ <execution>
+ <id>generate-version-class</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="scripts/antrun-version.xml" inheritAll="false" inheritRefs="false">
+ <property name="version" value="${version}" />
+ <property name="src.dir" value="${project.build.directory}/generated-sources" />
+ </ant>
+ </tasks>
+ <sourceRoot>
+ ${project.build.directory}/generated-sources
+ </sourceRoot>
+ </configuration>
+ </execution>
</executions>
</plugin>
Added: bpm-console/trunk/gui/war/scripts/antrun-version.xml
===================================================================
--- bpm-console/trunk/gui/war/scripts/antrun-version.xml (rev 0)
+++ bpm-console/trunk/gui/war/scripts/antrun-version.xml 2010-01-26 14:54:44 UTC (rev 937)
@@ -0,0 +1,12 @@
+<project basedir=".." default="generate-version">
+ <target name="generate-version">
+ <mkdir dir="${src.dir}/org/jboss/bpm/console/client"/>
+ <echo file="${src.dir}/org/jboss/bpm/console/client/Version.java">
+ package org.jboss.bpm.console.client;
+ /** Automatically generated by ant. */
+ public class Version {
+ public static final String VERSION = "${version}";
+ }
+ </echo>
+ </target>
+</project>
\ No newline at end of file
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml 2010-01-26 14:31:13 UTC (rev 936)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/Application.gwt.xml 2010-01-26 14:54:44 UTC (rev 937)
@@ -9,10 +9,7 @@
<inherits name="com.google.gwt.i18n.I18N"/>
<inherits name="com.google.gwt.user.ImageBundle"/>
<inherits name="com.google.gwt.xml.XML" />
-
- <!-- remove when migration to errai is done -->
- <inherits name="org.jboss.BPMWorkspace" />
-
+
<inherits name="org.jboss.errai.common.ErraiCommon"/>
<inherits name="org.jboss.errai.bus.ErraiBus" />
<inherits name="org.jboss.errai.workspaces.ErraiWorkspaces" />
Modified: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java 2010-01-26 14:31:13 UTC (rev 936)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/Application.java 2010-01-26 14:54:44 UTC (rev 937)
@@ -34,6 +34,7 @@
*
* @author Heiko.Braun <heiko.braun at jboss.com>
*/
+ at Deprecated
public class Application implements EntryPoint
{
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java 2010-01-26 14:31:13 UTC (rev 936)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/MainLayout.java 2010-01-26 14:54:44 UTC (rev 937)
@@ -1,270 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.bpm.console.client;
-
-import com.allen_sauer.gwt.log.client.DivLogger;
-import com.allen_sauer.gwt.log.client.Log;
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.client.Command;
-import com.google.gwt.user.client.DeferredCommand;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.ui.*;
-import com.mvc4g.client.Controller;
-import org.gwt.mosaic.ui.client.*;
-import org.gwt.mosaic.ui.client.layout.BorderLayout;
-import org.gwt.mosaic.ui.client.layout.BorderLayoutData;
-import org.gwt.mosaic.ui.client.layout.MosaicPanel;
-import org.gwt.mosaic.ui.client.util.ButtonHelper;
-import org.jboss.bpm.console.client.engine.UpdateDeploymentsAction;
-import org.jboss.bpm.console.client.engine.ViewDeploymentAction;
-import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
-import org.jboss.bpm.console.client.process.UpdateDefinitionsAction;
-import org.jboss.bpm.console.client.util.WindowUtil;
-import org.jboss.errai.bus.client.ErraiBus;
-import org.jboss.errai.bus.client.MessageBus;
-import org.jboss.errai.workspaces.client.Registry;
-
-import static org.gwt.mosaic.ui.client.layout.BorderLayout.Region;
-
-/**
- * The main composite that assembles the gwt console application.
- *
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public class MainLayout extends Composite implements ApplicationContext
-{
- private Header header;
- private Menu menu;
-
- private Workspace workspace;
-
- private Authentication auth;
- private ConsoleConfig config;
-
- private Controller controller;
- private Viewport viewport;
-
- private DivLogger divLogger;
-
- public MainLayout(Controller controller, Authentication auth, ConsoleConfig config)
- {
- this.controller = controller;
- this.auth = auth;
- this.config = config;
-
- final MessageBus bus = ErraiBus.get();
- if(null==bus)
- throw new IllegalStateException("Failed to initialize errai-bus");
-
- Registry.set(ApplicationContext.class, this);
- Registry.set(Controller.class, controller);
-
- display();
- }
-
- public void display()
- {
- viewport = new Viewport();
-
- // manually, otherwise it will appear on the login screen
- divLogger = new DivLogger();
- Log.addLogger(divLogger);
-
- MosaicPanel layout = createLayout();
- viewport.getLayoutPanel().add(layout);
-
- // bootstrap
- controller.handleEvent(
- new com.mvc4g.client.Event(BootstrapAction.ID, Boolean.TRUE)
- );
-
- Timer t = new Timer() {
-
- public void run()
- {
- // hide the loading div
- DeferredCommand.addCommand(
- new Command()
- {
- public void execute()
- {
- //DOM.getElementById("ui_loading").getStyle().setProperty("visibility", "hidden");
- //DOM.getElementById("splash").getStyle().setProperty("visibility", "hidden");
- }
- });
-
- }
- };
- t.schedule(2000);
-
- RootPanel.get().add(viewport);
-
- }
-
- private MosaicPanel createLayout()
- {
- final MosaicPanel panel = new MosaicPanel(new BorderLayout());
-
- // header
- header = new Header(this, auth.getUsername(), auth.getRolesAssigned());
- panel.add(header, new BorderLayoutData(Region.NORTH, 50));
-
- // menu
- menu = new Menu();
- panel.add(menu, new BorderLayoutData(Region.WEST, 180));
-
- // workspace
- workspace = createWorkspace();
- panel.add(workspace, new BorderLayoutData(Region.CENTER, false));
- registerGlobalViewsAndActions();
-
- // message Panel
- final CaptionLayoutPanel messagePanel = createMessagePanel(panel);
- messagePanel.add(divLogger.getWidget());
- messagePanel.setCollapsed(true);
- panel.add(messagePanel, new BorderLayoutData(Region.SOUTH, true));
-
- // Turn on DivLogger
- divLogger.getWidget().setVisible(true);
-
- return panel;
-
- }
-
- /**
- * Views and actions accessible from any component
- */
- private void registerGlobalViewsAndActions()
- {
- // register global views and actions, available across editors
- controller.addView(Header.ID, header);
- controller.addAction(LoadingStatusAction.ID, new LoadingStatusAction());
- controller.addAction(BootstrapAction.ID, new BootstrapAction());
-
- controller.addAction(ViewDeploymentAction.ID, new ViewDeploymentAction());
- controller.addAction(UpdateDeploymentsAction.ID, new UpdateDeploymentsAction());
- controller.addAction(UpdateDefinitionsAction.ID, new UpdateDefinitionsAction());
-
- }
-
- private CaptionLayoutPanel createMessagePanel(final MosaicPanel panel)
- {
- final CaptionLayoutPanel messagePanel = new CaptionLayoutPanel("Messages", true);
-
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
- Button collapse = new Button(
- ButtonHelper.createButtonLabel(
- AbstractImagePrototype.create(icons.collapseDownIcon()),
- "",
- ButtonHelper.ButtonLabelType.TEXT_ON_TOP)
- );
- collapse.addClickHandler(
- new ClickHandler()
- {
- public void onClick(ClickEvent clickEvent)
- {
- messagePanel.setCollapsed(!messagePanel.isCollapsed());
- panel.layout();
- }
- }
- );
-
- messagePanel.getHeader().add(
- collapse,
- Caption.CaptionRegion.RIGHT
- );
- return messagePanel;
- }
-
- private Workspace createWorkspace()
- {
- Workspace workspace = new Workspace(menu);
- WorkspaceLauncher launcher = GWT.create(WorkspaceLauncher.class);
- launcher.launch(workspace); // calls Workspace.addEditor()
- return workspace;
- }
-
-// ---- ApplicationContext interface ----
-
-
- public Viewport getViewport()
- {
- return viewport;
- }
-
- public void displayMessage(final String message, final boolean isError)
- {
- if(isError)
- {
- ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
-
- WindowPanel err = new WindowPanel("Error");
- err.getHeader().add( new Image(icons.errorIcon()) );
- err.setAnimationEnabled(true);
- err.setSize("320px", "240px");
- ScrollLayoutPanel ScrollLayoutPanel = new ScrollLayoutPanel();
- ScrollLayoutPanel.add(new HTML(message));
- err.setWidget(ScrollLayoutPanel);
-
- WindowUtil.addMaximizeButton(err, Caption.CaptionRegion.RIGHT);
- WindowUtil.addMinimizeButton(err, Caption.CaptionRegion.RIGHT);
-
- err.center();
- }
- else
- {
- MessageBox.info("", message);
- }
- }
-
- public Authentication getAuthentication()
- {
- return auth;
- }
-
- public ConsoleConfig getConfig()
- {
- return config;
- }
-
- public Workspace getWorkpace()
- {
- return workspace;
- }
-
- /**
- * hack in order to correctly display widgets that have
- * been rendered hidden
- */
- public void refreshView()
- {
- final int width = Window.getClientWidth();
- final int height = Window.getClientHeight();
- //getViewport().onWindowResized(width, height);
- //getViewport().getLayoutPanel().getResizableWidget().onResize(width, height);
- viewport.getLayoutPanel().layout();
- }
-}
-
Deleted: bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java
===================================================================
--- bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java 2010-01-26 14:31:13 UTC (rev 936)
+++ bpm-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/WorkspaceLauncher.java 2010-01-26 14:54:44 UTC (rev 937)
@@ -1,30 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.bpm.console.client;
-
-/**
- * @author Heiko.Braun <heiko.braun at jboss.com>
- */
-public interface WorkspaceLauncher
-{
- void launch(Workspace workspace);
-}
More information about the overlord-commits
mailing list