You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(233) |
Sep
(199) |
Oct
(206) |
Nov
(185) |
Dec
(270) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(232) |
Feb
(426) |
Mar
(623) |
Apr
(592) |
May
(506) |
Jun
(389) |
Jul
(160) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(5) |
2007 |
Jan
(1) |
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
(4) |
Jun
(2) |
Jul
|
Aug
(3) |
Sep
(5) |
Oct
(9) |
Nov
(6) |
Dec
(6) |
2008 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
(3) |
May
(3) |
Jun
(5) |
Jul
(10) |
Aug
(2) |
Sep
(12) |
Oct
(10) |
Nov
(54) |
Dec
(49) |
2009 |
Jan
(19) |
Feb
(13) |
Mar
(20) |
Apr
(24) |
May
(44) |
Jun
(29) |
Jul
(32) |
Aug
(10) |
Sep
(7) |
Oct
(10) |
Nov
(4) |
Dec
(17) |
2010 |
Jan
(14) |
Feb
(5) |
Mar
(23) |
Apr
(50) |
May
(31) |
Jun
(9) |
Jul
(5) |
Aug
(4) |
Sep
(7) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
2011 |
Jan
(12) |
Feb
(5) |
Mar
(5) |
Apr
(3) |
May
(4) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2012 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2015 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <jbo...@li...> - 2006-05-30 17:11:59
|
Author: jfr...@jb... Date: 2006-05-30 13:11:53 -0400 (Tue, 30 May 2006) New Revision: 4486 Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh Log: build the compress tarfile in 2 steps. The Solaris tar does not like the z option. Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-30 16:11:54 UTC (rev 4485) +++ labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-30 17:11:53 UTC (rev 4486) @@ -479,6 +479,9 @@ # # Build a tarball with the all stuff (cd $TOOLS/ - tar zcvf php5servlet.tar.gz PHP/lib webapps + rm -f php5servlet.tar.gz + rm -f php5servlet.tar + tar cvf php5servlet.tar PHP/lib webapps + gzip -9 php5servlet.tar ) |
From: <jbo...@li...> - 2006-05-30 16:12:26
|
Author: jfr...@jb... Date: 2006-05-30 12:11:54 -0400 (Tue, 30 May 2006) New Revision: 4485 Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh Log: Remove the dev18 specific entry. Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-30 14:47:13 UTC (rev 4484) +++ labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-30 16:11:54 UTC (rev 4485) @@ -177,22 +177,6 @@ " ADDFLAGS="-I $JAVA_HOME/include/linux" ;; - dev18*) - EXTTYPE=static - ADDCONF="\ - --with-freetype-dir \ - --with-t1lib \ - \ - --with-xpm-dir=no \ - --with-t1lib=no \ - --with-curl \ - --with-openssl \ - --with-mysqli \ - --with-mysql \ - --with-pdo-mysql \ - " - ADDFLAGS="-I $JAVA_HOME/include/linux" - ;; dev13*) EXTTYPE=shared BUILDXML2=true |
From: <jbo...@li...> - 2006-05-30 14:47:26
|
Author: jfr...@jb... Date: 2006-05-30 10:47:13 -0400 (Tue, 30 May 2006) New Revision: 4484 Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh Log: Remove special logic for dev17. Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-30 13:50:30 UTC (rev 4483) +++ labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-30 14:47:13 UTC (rev 4484) @@ -125,6 +125,7 @@ # # depending on machine remove or add php extensions. OS=`uname -s` +PR=`uname -p` case `uname -n` in dev12) BUILDXML2=true @@ -157,27 +158,6 @@ export LD_LIBRARY_PATH ADDFLAGS="-I $JAVA_HOME/include/solaris" ;; - dev17*) - EXTTYPE=static - BUILDPSQL=true - ADDCONF="\ - --with-pic \ - --with-libdir=lib64 \ - --with-freetype-dir \ - \ - --with-xpm-dir=no \ - --with-t1lib=no \ - --with-imap=no \ - --with-pspell=no \ - --with-tidy=no \ - --with-curl \ - --with-openssl \ - --with-mysqli \ - --with-mysql \ - --with-pdo-mysql \ - " - ADDFLAGS="-fPIC" - ;; dev03*) EXTTYPE=static ADDCONF="\ @@ -245,7 +225,7 @@ ADDCONF="\ --with-freetype-dir \ --with-t1lib=no \ - --with-xpm-dir \ + --with-xpm-dir=no \ --with-mysqli \ --with-mysql \ --with-pdo-mysql \ @@ -260,6 +240,15 @@ ADDFLAGS="-I $JAVA_HOME/include/solaris" ;; esac + case ${PR} in + x86_64) + #ADDCONF="$ADDCONF --with-pic" + # with-libdir=lib64 causes problem with SSL (our openssl location). + # but without it ldap libraries are not found. + ADDCONF="$ADDCONF --with-libdir=lib64 --with-pic" + ADDFLAGS="$ADDFLAGS -fPIC" + ;; + esac esac # @@ -317,6 +306,11 @@ make clean make depend make install + case ${PR} in + x86_64) + ln -s ${TOOLS}/SSL/lib ${TOOLS}/SSL/lib64 + ;; + esac ) ADDCONF="$ADDCONF --with-openssl=$TOOLS/SSL --with-openssl-dir=$TOOLS/SSL" else |
From: <jbo...@li...> - 2006-05-30 13:50:34
|
Author: kev...@jb... Date: 2006-05-30 09:50:30 -0400 (Tue, 30 May 2006) New Revision: 4483 Modified: labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jta/TransactionManagerService.java labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jts/TransactionManagerService.java Log: Fixed multiple recovery threads Modified: labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jta/TransactionManagerService.java =================================================================== --- labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jta/TransactionManagerService.java 2006-05-30 11:18:35 UTC (rev 4482) +++ labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jta/TransactionManagerService.java 2006-05-30 13:50:30 UTC (rev 4483) @@ -36,13 +36,13 @@ import com.arjuna.ats.internal.jbossatx.jta.jca.XATerminator; import com.arjuna.ats.internal.jbossatx.agent.LocalJBossAgentImpl; -import com.arjuna.ats.internal.arjuna.recovery.RecoveryManagerImple; import com.arjuna.ats.internal.jta.transaction.arjunacore.UserTransactionImple; import com.arjuna.ats.jta.utils.JNDIManager; import com.arjuna.ats.jta.common.Environment; import com.arjuna.ats.jta.common.jtaPropertyManager; import com.arjuna.ats.arjuna.common.Uid; import com.arjuna.ats.arjuna.coordinator.TxStats; +import com.arjuna.ats.arjuna.recovery.RecoveryManager; import com.arjuna.ats.internal.tsmx.mbeans.PropertyServiceJMXPlugin; import com.arjuna.common.util.propertyservice.PropertyManagerFactory; @@ -73,7 +73,7 @@ private final static String PROPAGATION_CONTEXT_EXPORTER_JNDI_REFERENCE = "java:/TransactionPropagationContextExporter"; private static final JBossXATerminator TERMINATOR = new XATerminator() ; - private RecoveryManagerImple _recoveryManager; + private RecoveryManager _recoveryManager; private boolean _initialised = false; private boolean _runRM = true; private int _transactionTimeout = -1; @@ -127,7 +127,7 @@ { this.getLog().info("Starting recovery manager"); - _recoveryManager = new RecoveryManagerImple(true); + _recoveryManager = RecoveryManager.manager() ; this.getLog().info("Recovery manager started"); } Modified: labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jts/TransactionManagerService.java =================================================================== --- labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jts/TransactionManagerService.java 2006-05-30 11:18:35 UTC (rev 4482) +++ labs/jbosstm/trunk/atsintegration/classes/com/arjuna/ats/jbossatx/jts/TransactionManagerService.java 2006-05-30 13:50:30 UTC (rev 4483) @@ -37,7 +37,6 @@ import com.arjuna.ats.internal.jbossatx.jts.PropagationContextWrapper; import com.arjuna.ats.internal.jbossatx.jts.jca.XATerminator; import com.arjuna.ats.internal.jbossatx.agent.LocalJBossAgentImpl; -import com.arjuna.ats.internal.arjuna.recovery.RecoveryManagerImple; import com.arjuna.ats.internal.jta.transaction.jts.UserTransactionImple; import com.arjuna.ats.jta.utils.JNDIManager; import com.arjuna.ats.jta.common.Environment; @@ -45,6 +44,7 @@ import com.arjuna.ats.jts.common.jtsPropertyManager; import com.arjuna.ats.arjuna.common.Uid; import com.arjuna.ats.arjuna.coordinator.TxStats; +import com.arjuna.ats.arjuna.recovery.RecoveryManager; import com.arjuna.orbportability.ORB; import com.arjuna.orbportability.OA; @@ -78,7 +78,7 @@ private final static String PROPAGATION_CONTEXT_EXPORTER_JNDI_REFERENCE = "java:/TransactionPropagationContextExporter"; private static final JBossXATerminator TERMINATOR = new XATerminator() ; - private RecoveryManagerImple _recoveryManager; + private RecoveryManager _recoveryManager; private boolean _initialised = false; private boolean _runRM = true; @@ -148,7 +148,7 @@ { this.getLog().info("Starting recovery manager"); - _recoveryManager = new RecoveryManagerImple(true); + _recoveryManager = RecoveryManager.manager() ; this.getLog().info("Recovery manager started"); } |
From: <jbo...@li...> - 2006-05-30 11:18:45
|
Author: wrzep Date: 2006-05-30 07:18:35 -0400 (Tue, 30 May 2006) New Revision: 4482 Added: labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastConfWatcher.java labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastLocations.java Removed: labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastNodeWatcher.java Modified: labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastDescriptor.java labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastPortlet.java labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastTools.java Log: http://jira.jboss.com/jira/browse/JBLAB-686 Pawel Modified: labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java 2006-05-30 10:03:54 UTC (rev 4481) +++ labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/Podcast.java 2006-05-30 11:18:35 UTC (rev 4482) @@ -78,7 +78,7 @@ /* Other tags in the xml file */ private static final String FEED_ELEMENT = "feed"; private static final String ID_ELEMENT = "id"; - private static final String URL_ELEMENT = "url"; + private static final String URL_ELEMENT = "url"; private static final int BYTES_IN_MB = (1024*1024); Added: labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastConfWatcher.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastConfWatcher.java 2006-05-30 10:03:54 UTC (rev 4481) +++ labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastConfWatcher.java 2006-05-30 11:18:35 UTC (rev 4482) @@ -0,0 +1,75 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, 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.forge.podcast; + +import java.util.Map; + +import org.jboss.shotoku.cache.ChangeType; +import org.jboss.shotoku.cache.ShotokuResourceWatcher; +import org.jboss.shotoku.tools.Pair; + +/** +* @author Pawel Wrzeszcz +*/ + +public class PodcastConfWatcher extends + ShotokuResourceWatcher<Pair<String,String>, PodcastDescriptor> { + + public PodcastConfWatcher(long interval) { + super(interval); + } + + @Override + public PodcastDescriptor init(Pair<String, String> key) { + + String portalName = key.getFirst(); + + addWatchedPath(key, PodcastLocations.getXmlCmPath(portalName)); + + return getDesc(key); + } + + @Override + /* Called only when some of the watched resources changes. */ + protected void update(Pair<String, String> key, + PodcastDescriptor currentObject, Map<String, ChangeType> changes) { + + put(key, getDesc(key)); + } + + @Override + /* Called to check whether observed feeds changed. */ + public void update(Pair<String, String> key, PodcastDescriptor desc) { + + put(key, getDesc(key)); + } + + private PodcastDescriptor getDesc(Pair<String,String> key) { + + String portalName = key.getFirst(); + String serverAdress = key.getSecond(); + + return new PodcastDescriptor(portalName, serverAdress); + } + +} Modified: labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastDescriptor.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastDescriptor.java 2006-05-30 10:03:54 UTC (rev 4481) +++ labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastDescriptor.java 2006-05-30 11:18:35 UTC (rev 4482) @@ -22,12 +22,13 @@ package org.jboss.forge.podcast; -import org.jboss.forge.podcast.PodcastTools; +import org.jboss.forge.podcast.PodcastLocations; import org.apache.xerces.parsers.DOMParser; import org.jboss.portal.common.context.DelegateContext; import org.jboss.portlet.JBossRenderRequest; import org.jboss.shotoku.ContentManager; +import org.jboss.shotoku.aop.Inject; import org.w3c.dom.Node; import org.xml.sax.InputSource; @@ -41,11 +42,13 @@ private Podcast podcast; + @Inject + private ContentManager cm; - public PodcastDescriptor(String portalName, String serverAdress, ContentManager cm) { + public PodcastDescriptor(String portalName, String serverAdress) { try { DOMParser parser = new DOMParser(); - parser.parse(new InputSource(cm.getNode(PodcastTools + parser.parse(new InputSource(cm.getNode(PodcastLocations .getXmlCmPath(portalName)).getContentInputStream())); Node root = parser.getDocument().getDocumentElement(); Added: labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastLocations.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastLocations.java 2006-05-30 10:03:54 UTC (rev 4481) +++ labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastLocations.java 2006-05-30 11:18:35 UTC (rev 4482) @@ -0,0 +1,43 @@ +package org.jboss.forge.podcast; + +/** + * Common constants and functions. + * @author Pawel Wrzeszcz + */ +public class PodcastLocations { + + /** + * <code>PODCAST_XML<code> - file defining the list of watched feeds + */ + private final static String PODCAST_XML = "podcast.xml"; + + /** + * <code>PODCAST_DIR</code> - directory in which file <code>PODCAST_XML<code> is stored. + */ + private final static String PODCAST_DIR = "podcast"; + + private final static String PODCAST_JSP = "podcast.jsp"; + private final static String PODCAST_JSP_SMALL = "podcast_small.jsp"; + private final static String PODCAST_JSP_DIR = "podcast"; + + /** + * Path to the xml file defining list of watched feeds. + */ + public static String getXmlCmPath(String portalName) { + return portalName + "/" + PODCAST_DIR + "/" + PODCAST_XML; + } + + /** + * Path to the file displaying the podcast feeds. + */ + public static String getJspCmPath() { + return PODCAST_JSP_DIR + "/" + PODCAST_JSP; + } + + /** + * Path to the file displaying latest podcast in small area. + */ + public static String getJspSmallCmPath() { + return PODCAST_JSP_DIR + "/" + PODCAST_JSP_SMALL; + } +} Deleted: labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastNodeWatcher.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastNodeWatcher.java 2006-05-30 10:03:54 UTC (rev 4481) +++ labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastNodeWatcher.java 2006-05-30 11:18:35 UTC (rev 4482) @@ -1,52 +0,0 @@ -/* - * JBoss, Home of Professional Open Source - * Copyright 2005, 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.forge.podcast; - -import org.jboss.forge.common.service.NodeWatcher; -import org.jboss.shotoku.ContentManager; - -/** -* @author Pawel Wrzeszcz -*/ - -public class PodcastNodeWatcher implements NodeWatcher { - private ContentManager cm; - private String serverAdress; - - public PodcastNodeWatcher(ContentManager cm, String serverAdress) { - this.cm = cm; - this.serverAdress = serverAdress; - } - - private PodcastDescriptor getDesc(String portalName) { - return new PodcastDescriptor(portalName, serverAdress, cm); - } - - public Object init(String portalName) { - return getDesc(portalName); - } - - public Object nodeUpdate(String portalName, Object currentValue) { - return getDesc(portalName); - } -} Modified: labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastPortlet.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastPortlet.java 2006-05-30 10:03:54 UTC (rev 4481) +++ labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastPortlet.java 2006-05-30 11:18:35 UTC (rev 4482) @@ -54,9 +54,9 @@ if ((modeFromPref != null) && modeFromPref.equals("yes")) { - jspPath = PodcastTools.getJspSmallCmPath(); + jspPath = PodcastLocations.getJspSmallCmPath(); } else { - jspPath = PodcastTools.getJspCmPath(); + jspPath = PodcastLocations.getJspCmPath(); } // Getting the podcast context Modified: labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastTools.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastTools.java 2006-05-30 10:03:54 UTC (rev 4481) +++ labs/jbosslabs/trunk/portal-extensions/forge-podcast/src/java/org/jboss/forge/podcast/PodcastTools.java 2006-05-30 11:18:35 UTC (rev 4482) @@ -1,69 +1,22 @@ package org.jboss.forge.podcast; -import org.jboss.forge.common.ForgeHelper; +import org.jboss.shotoku.aop.CacheItem; +import org.jboss.shotoku.tools.Pair; -import org.jboss.shotoku.ContentManager; -import org.jboss.shotoku.aop.Inject; - /** - * Common constants and functions. * @author Pawel Wrzeszcz */ public class PodcastTools { - /** - * <code>PODCAST_XML<code> - file defining the list of watched feeds - */ - private final static String PODCAST_XML = "podcast.xml"; + /* update every 5 minutes */ + private static final long UPDATE_INTERVAL = 5*60*1000; /* milliseconds */ - /** - * <code>PODCAST_DIR</code> - directory in which file <code>PODCAST_XML<code> is stored. - */ - private final static String PODCAST_DIR = "podcast"; + @CacheItem(interval=UPDATE_INTERVAL) + private static PodcastConfWatcher conf; - private final static String PODCAST_JSP = "podcast.jsp"; - private final static String PODCAST_JSP_SMALL = "podcast_small.jsp"; - private final static String PODCAST_JSP_DIR = "podcast"; - - @Inject - private static ContentManager cm; - - /** - * Path to the xml file defining list of watched feeds. - */ - public static String getXmlCmPath(String portalName) { - return portalName + "/" + PODCAST_DIR + "/" + PODCAST_XML; + public static synchronized PodcastDescriptor + getDesc(final String portalName, String serverAdress) { + return conf.get(new Pair<String,String>(portalName,serverAdress)); } - - /** - * Path to the file displaying the podcast feeds. - */ - public static String getJspCmPath() { - return PODCAST_JSP_DIR + "/" + PODCAST_JSP; - } - /** - * Path to the file displaying latest podcast in small area. - */ - public static String getJspSmallCmPath() { - return PODCAST_JSP_DIR + "/" + PODCAST_JSP_SMALL; - } - - public static synchronized PodcastDescriptor getDesc(final String portalName, - final String serverAdress) { - String cacheKey = PodcastDescriptor.class.getName(); - - PodcastDescriptor desc = (PodcastDescriptor) ForgeHelper - .getForgeManagement().getFromCache(portalName, cacheKey); - - if (desc == null) - desc = (PodcastDescriptor) ForgeHelper.getForgeManagement() - .addNodeWatcher(portalName, - cacheKey, - new PodcastNodeWatcher(cm, serverAdress)); - - return desc; - } - - -} +} \ No newline at end of file |
From: <jbo...@li...> - 2006-05-30 10:03:58
|
Author: mla...@jb... Date: 2006-05-30 06:03:54 -0400 (Tue, 30 May 2006) New Revision: 4481 Modified: labs/jbossweb/branches/dotnet/src/windows/generators/m2n/M2N.csproj Log: Fix common include paths fo m2n Modified: labs/jbossweb/branches/dotnet/src/windows/generators/m2n/M2N.csproj =================================================================== --- labs/jbossweb/branches/dotnet/src/windows/generators/m2n/M2N.csproj 2006-05-30 10:00:47 UTC (rev 4480) +++ labs/jbossweb/branches/dotnet/src/windows/generators/m2n/M2N.csproj 2006-05-30 10:03:54 UTC (rev 4481) @@ -61,9 +61,9 @@ </ItemGroup> <ItemGroup> <Compile Include="..\common\AssemblyTypeLoader.cs" /> - <Compile Include="..\common\ClassEmit.cs" /> + <Compile Include="ClassEmit.cs" /> <Compile Include="..\common\Cmdline.cs" /> - <Compile Include="Common.cs" /> + <Compile Include="..\common\Common.cs" /> <Compile Include="Constants.cs" /> <Compile Include="HeaderEmit.cs" /> <Compile Include="Properties\Resources.Designer.cs"> |
From: <jbo...@li...> - 2006-05-30 10:00:58
|
Author: mla...@jb... Date: 2006-05-30 06:00:47 -0400 (Tue, 30 May 2006) New Revision: 4480 Removed: labs/jbossweb/branches/dotnet/src/windows/generators/j2n/Cmdline.cs labs/jbossweb/branches/dotnet/src/windows/generators/m2j/AssemblyTypeLoader.cs labs/jbossweb/branches/dotnet/src/windows/generators/m2j/Cmdline.cs labs/jbossweb/branches/dotnet/src/windows/generators/m2j/Common.cs labs/jbossweb/branches/dotnet/src/windows/generators/m2m/AssemblyTypeLoader.cs labs/jbossweb/branches/dotnet/src/windows/generators/m2m/Cmdline.cs labs/jbossweb/branches/dotnet/src/windows/generators/m2m/Common.cs labs/jbossweb/branches/dotnet/src/windows/generators/m2n/AssemblyTypeLoader.cs labs/jbossweb/branches/dotnet/src/windows/generators/m2n/Cmdline.cs labs/jbossweb/branches/dotnet/src/windows/generators/m2n/Common.cs Modified: labs/jbossweb/branches/dotnet/src/windows/generators/j2n/J2N.csproj labs/jbossweb/branches/dotnet/src/windows/generators/m2j/M2J.csproj labs/jbossweb/branches/dotnet/src/windows/generators/m2m/M2M.csproj labs/jbossweb/branches/dotnet/src/windows/generators/m2n/M2N.csproj Log: Use common folder for common files. Deleted: labs/jbossweb/branches/dotnet/src/windows/generators/j2n/Cmdline.cs =================================================================== --- labs/jbossweb/branches/dotnet/src/windows/generators/j2n/Cmdline.cs 2006-05-30 09:56:59 UTC (rev 4479) +++ labs/jbossweb/branches/dotnet/src/windows/generators/j2n/Cmdline.cs 2006-05-30 10:00:47 UTC (rev 4480) @@ -1,181 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; - -/** - * @author Mladen Turk - * @version $Revision$ $Date$ - */ -namespace JBoss -{ - class Cmdline - { - string classname = null; - string dllname = null; - string nsname = null; - string chkoption = null; - static bool gendoc = false; - static bool genmod = false; - static string outdir = ""; - - public string Namespace - { - get - { - return nsname; - } - } - - public string ClassName - { - get - { - return classname; - } - } - - public string DllName - { - get - { - return dllname; - } - } - - public string CheckType - { - get - { - return chkoption; - } - } - - public static string OutputDirectory - { - get - { - return outdir; - } - } - - public static bool GenerateDocs - { - get - { - return gendoc; - } - } - - public static bool GenerateModule - { - get - { - return genmod; - } - } - - public Cmdline(string[] args) - { - int n = args.Length; - int i; - string arg; - for (i = 0; i < n; i++) - { - arg = args[i]; - if (arg.StartsWith("-") || arg.StartsWith("/")) - { - arg = arg.Substring(1); - arg = arg.ToLower(); - if (arg.StartsWith("c")) - { - if (i < (n - 1)) - { - i++; - classname = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("a")) - { - if (i < (n - 1)) - { - i++; - dllname = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("t")) - { - if (i < (n - 1)) - { - i++; - chkoption = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("n")) - { - if (i < (n - 1)) - { - i++; - nsname = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("o")) - { - if (i < (n - 1)) - { - i++; - outdir = args[i]; - if (outdir.Length > 0) - { - if (!outdir.EndsWith("\\")) - outdir += "\\"; - } - else - { - throw new Exception("Invalid command line option value."); - } - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("d")) - { - gendoc = true; - } - else if (arg.StartsWith("m")) - { - genmod = false; - } - else - { - throw new Exception("Unknown command line option " + arg); - - } - } - else - { - if (nsname == null) - nsname = arg; - } - } - } - } -} Modified: labs/jbossweb/branches/dotnet/src/windows/generators/j2n/J2N.csproj =================================================================== --- labs/jbossweb/branches/dotnet/src/windows/generators/j2n/J2N.csproj 2006-05-30 09:56:59 UTC (rev 4479) +++ labs/jbossweb/branches/dotnet/src/windows/generators/j2n/J2N.csproj 2006-05-30 10:00:47 UTC (rev 4480) @@ -41,7 +41,7 @@ </ItemGroup> <ItemGroup> <Compile Include="ClassEmit.cs" /> - <Compile Include="Cmdline.cs" /> + <Compile Include="..\common\Cmdline.cs" /> <Compile Include="Constants.cs" /> <Compile Include="HeaderEmit.cs" /> <Compile Include="JNI.cs" /> @@ -55,7 +55,7 @@ <Compile Include="XmlClassDefinition.cs" /> </ItemGroup> <ItemGroup> - <Content Include="jboss.ico" /> + <Content Include="..\common\jboss.ico" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Deleted: labs/jbossweb/branches/dotnet/src/windows/generators/m2j/AssemblyTypeLoader.cs =================================================================== --- labs/jbossweb/branches/dotnet/src/windows/generators/m2j/AssemblyTypeLoader.cs 2006-05-30 09:56:59 UTC (rev 4479) +++ labs/jbossweb/branches/dotnet/src/windows/generators/m2j/AssemblyTypeLoader.cs 2006-05-30 10:00:47 UTC (rev 4480) @@ -1,161 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Runtime; -using System.Text; -using System.Xml; -using System.Xml.XPath; - -namespace JBoss -{ - class AssemblyTypeLoader - { - private static Assembly[] _asm = { - Assembly.GetAssembly(typeof(Microsoft.Win32.Registry)), - Assembly.GetAssembly(typeof(Microsoft.CSharp.CSharpCodeProvider)), - Assembly.GetAssembly(typeof(System.Configuration.AppSettingsSection)), - Assembly.GetAssembly(typeof(System.Configuration.Install.AssemblyInstaller)), - Assembly.GetAssembly(typeof(System.Data.Constraint)), - Assembly.GetAssembly(typeof(System.Data.OracleClient.OracleBFile)), - Assembly.GetAssembly(typeof(System.DirectoryServices.ActiveDirectoryAccessRule)), - Assembly.GetAssembly(typeof(System.DirectoryServices.Protocols.AddRequest)), - Assembly.GetAssembly(typeof(System.Drawing.Bitmap)), - Assembly.GetAssembly(typeof(System.EnterpriseServices.Activity)), - Assembly.GetAssembly(typeof(System.Messaging.AccessControlEntry)), - Assembly.GetAssembly(typeof(System.Runtime.Remoting.Channels.BinaryClientFormatterSink)), - Assembly.GetAssembly(typeof(System.Security.Cryptography.CryptographicAttributeObject)), - Assembly.GetAssembly(typeof(System.Transactions.CommittableTransaction)), - - - Assembly.GetAssembly(typeof(System.Web.ApplicationShutdownReason)), - Assembly.GetAssembly(typeof(System.Web.RegularExpressions.AspCodeRegex)), - Assembly.GetAssembly(typeof(System.Web.Services.WebMethodAttribute)), - Assembly.GetAssembly(typeof(System.Windows.Forms.AccessibleObject)), - Assembly.GetAssembly(typeof(System.Xml.NameTable)) - }; - - private static string[] _xml = { - "mscorlib.xml", - "System.xml", - "System.Configuration.xml", - "System.Configuration.Install.xml", - "System.Data.xml", - "System.Data.OracleClient.xml", - "System.DirectoryServices.xml", - "System.DirectoryServices.Protocols.xml", - "System.Drawing.xml", - "System.EnterpriseServices.xml", - "System.Messaging.xml", - "System.Runtime.Remoting.xml", - "System.Security.xml", - "System.Transactions.xml", - - - "System.Web.xml", - "System.Web.RegularExpressions.xml", - "System.Web.Services.xml", - "System.Windows.Forms.xml", - "System.Xml.xml" - }; - - private Assembly _assembly = null; - private string _xmldoc = null; - private Type _type = null; - - static ArrayList _dynAsm = new ArrayList(); - - static void Add(Assembly asm) - { - _dynAsm.Add(asm); - } - - public AssemblyTypeLoader() - { - } - - public void Load(string name) - { - string n = name + ".xml"; - for (int i = 0; i < _xml.Length; i++) - { - if (n.Equals(_xml[i])) - { - _assembly = _asm[i]; - if (Cmdline.GenerateDocs) - _xmldoc = _xml[i]; - break; - } - } - if (_assembly == null) - { - for (int i = 0; i < _dynAsm.Count; i++) - { - Assembly a = (Assembly)_dynAsm[i]; - if (a.FullName.StartsWith(name)) - { - _assembly = a; - _xmldoc = null; - break; - } - } - } - if (_assembly == null) - { - throw new Exception("Could not find " + name + " Assembly"); - } - } - - public static void LoadFrom(string fileName) - { - Add(Assembly.LoadFrom(fileName)); - } - - public AssemblyTypeLoader(String fullName) - { - for (int i = 0; i < _asm.Length; i++) { - if ((_type = _asm[i].GetType(fullName)) != null) - { - _assembly = _asm[i]; - if (Cmdline.GenerateDocs) - _xmldoc = _xml[i]; - break; - } - } - if (_assembly == null) - { - for (int i = 0; i < _dynAsm.Count; i++) - { - Assembly a = (Assembly)_dynAsm[i]; - if ((_type = a.GetType(fullName)) != null) - { - _assembly = a; - _xmldoc = null; - break; - } - } - - } - if (_assembly == null) - { - throw new Exception("Could not find " + fullName + " Type"); - } - } - - public Assembly Assembly - { - get { return _assembly; } - } - - public string XMLDoc - { - get { return _xmldoc; } - } - - public Type Type - { - get { return _type; } - } - } -} Deleted: labs/jbossweb/branches/dotnet/src/windows/generators/m2j/Cmdline.cs =================================================================== --- labs/jbossweb/branches/dotnet/src/windows/generators/m2j/Cmdline.cs 2006-05-30 09:56:59 UTC (rev 4479) +++ labs/jbossweb/branches/dotnet/src/windows/generators/m2j/Cmdline.cs 2006-05-30 10:00:47 UTC (rev 4480) @@ -1,181 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; - -/** - * @author Mladen Turk - * @version $Revision$ $Date$ - */ -namespace JBoss -{ - class Cmdline - { - string classname = null; - string dllname = null; - string nsname = null; - string chkoption = null; - static bool gendoc = false; - static bool genmod = false; - static string outdir = ""; - - public string Namespace - { - get - { - return nsname; - } - } - - public string ClassName - { - get - { - return classname; - } - } - - public string DllName - { - get - { - return dllname; - } - } - - public string CheckType - { - get - { - return chkoption; - } - } - - public static string OutputDirectory - { - get - { - return outdir; - } - } - - public static bool GenerateDocs - { - get - { - return gendoc; - } - } - - public static bool GenerateModule - { - get - { - return genmod; - } - } - - public Cmdline(string[] args) - { - int n = args.Length; - int i; - string arg; - for (i = 0; i < n; i++) - { - arg = args[i]; - if (arg.StartsWith("-") || arg.StartsWith("/")) - { - arg = arg.Substring(1); - arg = arg.ToLower(); - if (arg.StartsWith("c")) - { - if (i < (n - 1)) - { - i++; - classname = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("a")) - { - if (i < (n - 1)) - { - i++; - dllname = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("t")) - { - if (i < (n - 1)) - { - i++; - chkoption = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("n")) - { - if (i < (n - 1)) - { - i++; - nsname = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("o")) - { - if (i < (n - 1)) - { - i++; - outdir = args[i]; - if (outdir.Length > 0) - { - if (!outdir.EndsWith("\\")) - outdir += "\\"; - } - else - { - throw new Exception("Invalid command line option value."); - } - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("d")) - { - gendoc = true; - } - else if (arg.StartsWith("m")) - { - genmod = false; - } - else - { - throw new Exception("Unknown command line option " + arg); - - } - } - else - { - if (nsname == null) - nsname = arg; - } - } - } - } -} Deleted: labs/jbossweb/branches/dotnet/src/windows/generators/m2j/Common.cs =================================================================== --- labs/jbossweb/branches/dotnet/src/windows/generators/m2j/Common.cs 2006-05-30 09:56:59 UTC (rev 4479) +++ labs/jbossweb/branches/dotnet/src/windows/generators/m2j/Common.cs 2006-05-30 10:00:47 UTC (rev 4480) @@ -1,539 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Runtime; -using System.Text; -using System.Xml; -using System.Xml.XPath; - -namespace JBoss -{ - public class InterfaceComparer : IComparer<Type> - { - int IComparer<Type>.Compare(Type tx, Type ty) - { - int nx = tx.GetInterfaces().Length; - int ny = ty.GetInterfaces().Length; - if (nx < ny) - return 1; - else if (nx == ny) - return 0; - else - return -1; - } - } - - class Common - { - static Hashtable _jtypes = new Hashtable(); - static Hashtable _ptypes = new Hashtable(); - static ArrayList _jmodis = new ArrayList(); - static Hashtable _wtypes = new Hashtable(); - - static Common() { - _jtypes.Add("System.Int16", "S"); - _jtypes.Add("System.Int32", "I"); - _jtypes.Add("System.Int64", "J"); - _jtypes.Add("System.Byte", "B"); - _jtypes.Add("System.SByte", "B"); - _jtypes.Add("System.Boolean", "Z"); - _jtypes.Add("System.Char", "C"); - _jtypes.Add("System.Void", "V"); - _jtypes.Add("System.Single", "F"); - _jtypes.Add("System.Double", "D"); - _jtypes.Add("System.UInt16", "I"); - _jtypes.Add("System.UInt32", "J"); - _jtypes.Add("System.UInt64", "J"); - - _ptypes.Add("System.Int16", "short"); - _ptypes.Add("System.Int32", "int"); - _ptypes.Add("System.Int64", "long"); - _ptypes.Add("System.Byte", "byte"); - _ptypes.Add("System.SByte", "byte"); - _ptypes.Add("System.Boolean", "boolean"); - _ptypes.Add("System.Char", "char"); - _ptypes.Add("System.Single", "float"); - _ptypes.Add("System.Double", "double"); - _ptypes.Add("System.UInt16", "int"); - _ptypes.Add("System.UInt32", "long"); - _ptypes.Add("System.UInt64", "long"); - _ptypes.Add("System.DateTime", "long"); - - _jmodis.Add("boolean"); - _jmodis.Add("extends"); - _jmodis.Add("final"); - _jmodis.Add("implements"); - _jmodis.Add("import"); - _jmodis.Add("instanceof"); - _jmodis.Add("native"); - _jmodis.Add("package"); - _jmodis.Add("strictfp"); - _jmodis.Add("String"); - _jmodis.Add("super"); - _jmodis.Add("synchronized"); - _jmodis.Add("throws"); - _jmodis.Add("transient"); - _jmodis.Add("array"); - _jmodis.Add("asm"); - _jmodis.Add("except"); - - _wtypes.Add("FILETIME", "IFILETIME"); - _wtypes.Add("STRICT", "ISTRICT"); - _wtypes.Add("NULL", "INULL"); - _wtypes.Add("ALTERNATE", "IALTERNATE"); - _wtypes.Add("delete", "implDelete"); - _wtypes.Add("register", "implRegister"); - } - - private static ArrayList _createdDirs = new ArrayList(); - - public static string Capitalize(string s) - { - if (s != null && s.Length > 0) - { - char [] c = s.ToCharArray(); - c[0] = Char.ToUpper(c[0]); - return new string(c); - } - else - return s; - } - - public static bool IsPrimitiveType(string name) - { - string p = (string)_ptypes[name]; - if (p == null) - return false; - else - return true; - } - - public static string GetPrimitiveType(string name) - { - return (string)_ptypes[name]; - } - - public static string GenerateNamespace(string className, bool isOpen) - { - int i = 0; - string[] names = className.Split(new Char[] { '.' }); - StringBuilder sb = new StringBuilder(); - - for (i = 0; i < names.Length - 1; i++) - { - if (isOpen) - { - sb.AppendFormat("namespace {0} {{\n", names[i]); - } - else - { - sb.Append('}'); - } - } - if (!isOpen) - { - string cn = ""; - for (i = 0; i < names.Length - 2; i++) - { - cn += names[i]; - cn += "::"; - } - cn += names[i]; - sb.AppendFormat(" // End of {0} Namespace declaration.", cn); - } - - - return sb.ToString(); - } - - public static void createDir(string nspace) - { - string[] paths = nspace.Split(new Char[] { '.' }); - string path = ""; - foreach (String p in paths) - { - path = path + p + "/"; - if (!Directory.Exists(path)) - Directory.CreateDirectory(path); - if (!_createdDirs.Contains(path)) - _createdDirs.Add(path); - } - } - - public static void dumpCreatedDirs(TextWriter wr) - { - if (_createdDirs.Count > 0) - { - wr.WriteLine(); - wr.WriteLine("$(BUILDIR):"); - IEnumerator e = _createdDirs.GetEnumerator(); - while (e.MoveNext()) - { - string path = (string)e.Current; - path = path.Replace('/', '\\'); - path = path.Substring(0, path.Length - 1); - wr.WriteLine("\t@$(MKDIR) $(BUILDIR)\\{0}", path); - } - wr.WriteLine(); - wr.WriteLine("{$(SRCDIR)}.cpp{$(BUILDIR)}.obj:"); - wr.WriteLine("\t$(CC) $(CFLAGS) $(INCLUDES) $(JAVA_INCLUDES) /Fo$(@D)\\ $(PDBFLAGS) $<"); - wr.WriteLine(); - e = _createdDirs.GetEnumerator(); - while (e.MoveNext()) - { - string path = (string)e.Current; - path = path.Replace('/', '\\'); - path = path.Substring(0, path.Length - 1); - wr.WriteLine("{{$(SRCDIR)\\{0}}}.cpp{{$(BUILDIR)\\{0}}}.obj:", path); - wr.WriteLine("\t$(CC) $(CFLAGS) $(INCLUDES) $(JAVA_INCLUDES) /Fo$(@D)\\ $(PDBFLAGS) $<"); - wr.WriteLine(); - } - } - } - - public static string getIncNsName(string name) - { - string r = name.Replace('.', '_'); - return r.ToUpper(); - } - - public static string getSafeNativeName(string name) - { - string r = (string)_wtypes[name]; - if (r == null) - return name; - else - return r; - } - - public static string GetSignature(ParameterInfo[] pi, string name) - { - if (name.StartsWith("System.") || name.StartsWith("Microsoft.")) - { - int x = name.LastIndexOf('.'); - string iiname = name.Substring(x + 1); - name = iiname; - } - - StringBuilder sb = new StringBuilder(name); - sb.Append('('); - foreach (ParameterInfo p in pi) - { - string fn = p.ParameterType.FullName; - if (p.ParameterType.IsArray) - { - sb.Append('['); - Type apt = p.ParameterType.GetElementType(); - if (apt.IsEnum) - sb.Append('I'); - else { - if (apt.IsArray) - { - sb.Append('['); - apt = apt.GetElementType(); - } - fn = apt.FullName; - string t = (string)_jtypes[fn]; - if (t != null) - sb.Append(t); - else - { - sb.Append('L'); - sb.Append(fn); - sb.Append(';'); - } - } - } - else if (p.ParameterType.IsEnum) - sb.Append('I'); - else - { - string t = (string)_jtypes[fn]; - if (t != null) - sb.Append(t); - else { - sb.Append('L'); - sb.Append(fn); - sb.Append(';'); - } - } - } - sb.Append(')'); - return sb.ToString(); - } - - public static void SortInterfaces(Type[] interfaces) - { - Array.Sort(interfaces, new InterfaceComparer()); - } - - public static string RN(string val) - { - if (_jmodis.Contains(val)) - return val + "Value"; - else - return val; - } - - private static Type[] getClassInterfaces(Type type) - { - ArrayList il = new ArrayList(); - if (type == null) - return null; - foreach (Type n in type.GetInterfaces()) - { - if (n.IsGenericType) - continue; - il.Add(n); - } - Type[] nested = getClassInterfaces(type.BaseType); - if (nested != null) - { - foreach (Type n in nested) - { - if (!il.Contains(n)) - il.Add(n); - } - } - return (Type[])il.ToArray(typeof(Type)); - - } - - public static Type[] GetClassInterfaces(Type type) - { - ArrayList il = new ArrayList(); - Type[] parent = getClassInterfaces(type.BaseType); - Type[] ti = type.GetInterfaces(); - foreach (Type n in ti) - { - if (n.IsGenericType) - continue; - if (parent != null) - { - bool exists = false; - foreach (Type p in parent) - { - if (p == n) - { - exists = true; - break; - } - } - if (!exists) - il.Add(n); - } - else - il.Add(n); - } - - return (Type[])il.ToArray(typeof(Type)); - } - - public static void checkAssembly(string name, string type) - { - - AssemblyTypeLoader asm = new AssemblyTypeLoader(); - asm.Load(name); - Type[] exp = asm.Assembly.GetExportedTypes(); - int i = 0; - bool skipGenerics = true; - bool skipObsolete = true; - if (type.Contains("+G")) - { - type = type.Replace("+G", ""); - skipGenerics = false; - } - if (type.Contains("+O")) - { - type = type.Replace("+O", ""); - skipObsolete = false; - } - foreach (Type t in exp) - { - string o = ""; - if (t.IsGenericType && skipGenerics) - continue; - if (IsObsolete(t)) - { - if (skipObsolete) - continue; - o = "Osbolete "; - } - string b = ""; - if (t.BaseType != null) - { - b = " : " + t.BaseType.Name; - } - if (type.Equals("I", StringComparison.CurrentCultureIgnoreCase)) - { - if (t.IsInterface) - { - Console.Out.Write(o); - Console.Out.WriteLine("{0}{1}", t.Name, b); - i++; - } - } - else if (type.Equals("A", StringComparison.CurrentCultureIgnoreCase)) - { - if (t.IsAbstract && !t.IsInterface && !t.IsSealed) - { - Console.Out.Write(o); - if (t.IsGenericType) - { - Type[] ga = t.GetGenericArguments(); - foreach (Type g in ga) - Console.Out.Write("{0} ", g.Name); - } - Console.Out.WriteLine("{0}{1}", t.Name, b); - i++; - } - } - else if (type.Equals("AS", StringComparison.CurrentCultureIgnoreCase)) - { - if (t.IsAbstract && !t.IsInterface && t.IsSealed) - { - Console.Out.Write(o); - Console.Out.WriteLine("{0}{1}", t.Name, b); - i++; - } - } - } - Console.Out.WriteLine("Total: {0}", i); - } - - public static bool IsTypeValidInAssembly(Type t) - { - - if (!t.IsVisible) - { - if (!t.IsNestedFamORAssem) - { - Console.Out.WriteLine("Skipped NonNested {0}", t.Name); - return false; - } - } - if (t.IsGenericType) - { - Console.Out.WriteLine("Skipped GenericType {0}", t.Name); - return false; - } - if (t.IsGenericTypeDefinition) - { - Console.Out.WriteLine("Skipped GenericTypeDefinition {0}", t.Name); - return false; - } - if (t.FullName.IndexOf('+') > 0) - { - Console.Out.WriteLine("Skipped Special {0}", t.FullName); - return false; - } - if (t.FullName.IndexOf('{') > 0) - { - Console.Out.WriteLine("Skipped Special {0}", t.FullName); - return false; - } - if (IsObsolete(t)) - { - Console.Out.WriteLine("Skipped Obsolete {0}", t.Name); - return false; - } - if (t.BaseType != null) - { - if (t.BaseType.IsGenericType) - { - Console.Out.WriteLine("Skipped Base GenericType {0}::{1}", t.Name, t.BaseType.Name); - return false; - } - if (t.BaseType.IsGenericTypeDefinition) - { - Console.Out.WriteLine("Skipped Base GenericTypeDefinition {0}::{1}", t.Name, t.BaseType.Name); - return false; - } - } - return true; - } - - public static bool IsObsolete(Type t) - { - ObsoleteAttribute oa = (ObsoleteAttribute)Attribute.GetCustomAttribute(t, typeof(ObsoleteAttribute)); - if (oa != null) - return true; - else - return false; - } - - public static bool IsObsoleteMethod(Object [] ca) - { - foreach(Object a in ca) { - if (a.GetType() == typeof(ObsoleteAttribute)) - return true; - } - return false; - } - - public static bool IsDelegate(Type t) - { - Type d = t; - while (d != null) - { - if (d == typeof(System.Delegate)) - return true; - d = d.BaseType; - } - return false; - } - - public static bool IsValidPropertyInClass(PropertyInfo p, Type declaringType) - { - if (p.DeclaringType != declaringType) - return false; - if (p.PropertyType.IsGenericParameter || p.PropertyType.IsGenericType || p.PropertyType.ContainsGenericParameters) - return false; - if (p.PropertyType.IsPointer) - return false; - if (IsObsolete(p.PropertyType)) - return false; - try - { - Type it; - AssemblyTypeLoader asm = new AssemblyTypeLoader(p.PropertyType.FullName); - it = asm.Type; - if (it == null) - return false; - else if (it.IsNotPublic) - return false; - } - catch - { - return false; - } - return true; - } - - public static string GetSafeFullName(Type t) - { - string fn = t.FullName; - fn = fn.Replace("*", ""); - fn = fn.Replace("[]", ""); - int i = fn.IndexOf('+'); - if (i > 0) - { - fn = fn.Substring(0, i); - } - fn = fn.Replace(".", "::"); - return fn; - } - - public static string GetSafeReturnName(Type t) - { - string fn = t.FullName; - fn = fn.Replace("*", ""); - fn = fn.Replace("[]", ""); - fn = fn.Replace("+", "::"); - fn = fn.Replace(".", "::"); - return fn; - } - } -} Modified: labs/jbossweb/branches/dotnet/src/windows/generators/m2j/M2J.csproj =================================================================== --- labs/jbossweb/branches/dotnet/src/windows/generators/m2j/M2J.csproj 2006-05-30 09:56:59 UTC (rev 4479) +++ labs/jbossweb/branches/dotnet/src/windows/generators/m2j/M2J.csproj 2006-05-30 10:00:47 UTC (rev 4480) @@ -63,9 +63,9 @@ <Reference Include="vjssupuilib" /> </ItemGroup> <ItemGroup> - <Compile Include="AssemblyTypeLoader.cs" /> - <Compile Include="Cmdline.cs" /> - <Compile Include="Common.cs" /> + <Compile Include="..\common\AssemblyTypeLoader.cs" /> + <Compile Include="..\common\Cmdline.cs" /> + <Compile Include="..\common\Common.cs" /> <Compile Include="Constants.cs" /> <Compile Include="JavaClassGenerator.cs" /> <Compile Include="JavaUtils.cs" /> @@ -74,7 +74,7 @@ <Compile Include="XmlDocumentation.cs" /> </ItemGroup> <ItemGroup> - <Content Include="jboss.ico" /> + <Content Include="..\common\jboss.ico" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Deleted: labs/jbossweb/branches/dotnet/src/windows/generators/m2m/AssemblyTypeLoader.cs =================================================================== --- labs/jbossweb/branches/dotnet/src/windows/generators/m2m/AssemblyTypeLoader.cs 2006-05-30 09:56:59 UTC (rev 4479) +++ labs/jbossweb/branches/dotnet/src/windows/generators/m2m/AssemblyTypeLoader.cs 2006-05-30 10:00:47 UTC (rev 4480) @@ -1,161 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Runtime; -using System.Text; -using System.Xml; -using System.Xml.XPath; - -namespace JBoss -{ - class AssemblyTypeLoader - { - private static Assembly[] _asm = { - Assembly.GetAssembly(typeof(Microsoft.Win32.Registry)), - Assembly.GetAssembly(typeof(Microsoft.CSharp.CSharpCodeProvider)), - Assembly.GetAssembly(typeof(System.Configuration.AppSettingsSection)), - Assembly.GetAssembly(typeof(System.Configuration.Install.AssemblyInstaller)), - Assembly.GetAssembly(typeof(System.Data.Constraint)), - Assembly.GetAssembly(typeof(System.Data.OracleClient.OracleBFile)), - Assembly.GetAssembly(typeof(System.DirectoryServices.ActiveDirectoryAccessRule)), - Assembly.GetAssembly(typeof(System.DirectoryServices.Protocols.AddRequest)), - Assembly.GetAssembly(typeof(System.Drawing.Bitmap)), - Assembly.GetAssembly(typeof(System.EnterpriseServices.Activity)), - Assembly.GetAssembly(typeof(System.Messaging.AccessControlEntry)), - Assembly.GetAssembly(typeof(System.Runtime.Remoting.Channels.BinaryClientFormatterSink)), - Assembly.GetAssembly(typeof(System.Security.Cryptography.CryptographicAttributeObject)), - Assembly.GetAssembly(typeof(System.Transactions.CommittableTransaction)), - - - Assembly.GetAssembly(typeof(System.Web.ApplicationShutdownReason)), - Assembly.GetAssembly(typeof(System.Web.RegularExpressions.AspCodeRegex)), - Assembly.GetAssembly(typeof(System.Web.Services.WebMethodAttribute)), - Assembly.GetAssembly(typeof(System.Windows.Forms.AccessibleObject)), - Assembly.GetAssembly(typeof(System.Xml.NameTable)) - }; - - private static string[] _xml = { - "mscorlib.xml", - "System.xml", - "System.Configuration.xml", - "System.Configuration.Install.xml", - "System.Data.xml", - "System.Data.OracleClient.xml", - "System.DirectoryServices.xml", - "System.DirectoryServices.Protocols.xml", - "System.Drawing.xml", - "System.EnterpriseServices.xml", - "System.Messaging.xml", - "System.Runtime.Remoting.xml", - "System.Security.xml", - "System.Transactions.xml", - - - "System.Web.xml", - "System.Web.RegularExpressions.xml", - "System.Web.Services.xml", - "System.Windows.Forms.xml", - "System.Xml.xml" - }; - - private Assembly _assembly = null; - private string _xmldoc = null; - private Type _type = null; - - static ArrayList _dynAsm = new ArrayList(); - - static void Add(Assembly asm) - { - _dynAsm.Add(asm); - } - - public AssemblyTypeLoader() - { - } - - public void Load(string name) - { - string n = name + ".xml"; - for (int i = 0; i < _xml.Length; i++) - { - if (n.Equals(_xml[i])) - { - _assembly = _asm[i]; - if (Cmdline.GenerateDocs) - _xmldoc = _xml[i]; - break; - } - } - if (_assembly == null) - { - for (int i = 0; i < _dynAsm.Count; i++) - { - Assembly a = (Assembly)_dynAsm[i]; - if (a.FullName.StartsWith(name)) - { - _assembly = a; - _xmldoc = null; - break; - } - } - } - if (_assembly == null) - { - throw new Exception("Could not find " + name + " Assembly"); - } - } - - public static void LoadFrom(string fileName) - { - Add(Assembly.LoadFrom(fileName)); - } - - public AssemblyTypeLoader(String fullName) - { - for (int i = 0; i < _asm.Length; i++) { - if ((_type = _asm[i].GetType(fullName)) != null) - { - _assembly = _asm[i]; - if (Cmdline.GenerateDocs) - _xmldoc = _xml[i]; - break; - } - } - if (_assembly == null) - { - for (int i = 0; i < _dynAsm.Count; i++) - { - Assembly a = (Assembly)_dynAsm[i]; - if ((_type = a.GetType(fullName)) != null) - { - _assembly = a; - _xmldoc = null; - break; - } - } - - } - if (_assembly == null) - { - throw new Exception("Could not find " + fullName + " Type"); - } - } - - public Assembly Assembly - { - get { return _assembly; } - } - - public string XMLDoc - { - get { return _xmldoc; } - } - - public Type Type - { - get { return _type; } - } - } -} Deleted: labs/jbossweb/branches/dotnet/src/windows/generators/m2m/Cmdline.cs =================================================================== --- labs/jbossweb/branches/dotnet/src/windows/generators/m2m/Cmdline.cs 2006-05-30 09:56:59 UTC (rev 4479) +++ labs/jbossweb/branches/dotnet/src/windows/generators/m2m/Cmdline.cs 2006-05-30 10:00:47 UTC (rev 4480) @@ -1,181 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; - -/** - * @author Mladen Turk - * @version $Revision$ $Date$ - */ -namespace JBoss -{ - class Cmdline - { - string classname = null; - string dllname = null; - string nsname = null; - string chkoption = null; - static bool gendoc = false; - static bool genmod = false; - static string outdir = ""; - - public string Namespace - { - get - { - return nsname; - } - } - - public string ClassName - { - get - { - return classname; - } - } - - public string DllName - { - get - { - return dllname; - } - } - - public string CheckType - { - get - { - return chkoption; - } - } - - public static string OutputDirectory - { - get - { - return outdir; - } - } - - public static bool GenerateDocs - { - get - { - return gendoc; - } - } - - public static bool GenerateModule - { - get - { - return genmod; - } - } - - public Cmdline(string[] args) - { - int n = args.Length; - int i; - string arg; - for (i = 0; i < n; i++) - { - arg = args[i]; - if (arg.StartsWith("-") || arg.StartsWith("/")) - { - arg = arg.Substring(1); - arg = arg.ToLower(); - if (arg.StartsWith("c")) - { - if (i < (n - 1)) - { - i++; - classname = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("a")) - { - if (i < (n - 1)) - { - i++; - dllname = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("t")) - { - if (i < (n - 1)) - { - i++; - chkoption = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("n")) - { - if (i < (n - 1)) - { - i++; - nsname = args[i]; - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("o")) - { - if (i < (n - 1)) - { - i++; - outdir = args[i]; - if (outdir.Length > 0) - { - if (!outdir.EndsWith("\\")) - outdir += "\\"; - } - else - { - throw new Exception("Invalid command line option value."); - } - } - else - { - throw new Exception("Missing command line option value."); - } - } - else if (arg.StartsWith("d")) - { - gendoc = true; - } - else if (arg.StartsWith("m")) - { - genmod = false; - } - else - { - throw new Exception("Unknown command line option " + arg); - - } - } - else - { - if (nsname == null) - nsname = arg; - } - } - } - } -} Deleted: labs/jbossweb/branches/dotnet/src/windows/generators/m2m/Common.cs =================================================================== --- labs/jbossweb/branches/dotnet/src/windows/generators/m2m/Common.cs 2006-05-30 09:56:59 UTC (rev 4479) +++ labs/jbossweb/branches/dotnet/src/windows/generators/m2m/Common.cs 2006-05-30 10:00:47 UTC (rev 4480) @@ -1,539 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Runtime; -using System.Text; -using System.Xml; -using System.Xml.XPath; - -namespace JBoss -{ - public class InterfaceComparer : IComparer<Type> - { - int IComparer<Type>.Compare(Type tx, Type ty) - { - int nx = tx.GetInterfaces().Length; - int ny = ty.GetInterfaces().Length; - if (nx < ny) - return 1; - else if (nx == ny) - return 0; - else - return -1; - } - } - - class Common - { - static Hashtable _jtypes = new Hashtable(); - static Hashtable _ptypes = new Hashtable(); - static ArrayList _jmodis = new ArrayList(); - static Hashtable _wtypes = new Hashtable(); - - static Common() { - _jtypes.Add("System.Int16", "S"); - _jtypes.Add("System.Int32", "I"); - _jtypes.Add("System.Int64", "J"); - _jtypes.Add("System.Byte", "B"); - _jtypes.Add("System.SByte", "B"); - _jtypes.Add("System.Boolean", "Z"); - _jtypes.Add("System.Char", "C"); - _jtypes.Add("System.Void", "V"); - _jtypes.Add("System.Single", "F"); - _jtypes.Add("System.Double", "D"); - _jtypes.Add("System.UInt16", "I"); - _jtypes.Add("System.UInt32", "J"); - _jtypes.Add("System.UInt64", "J"); - - _ptypes.Add("System.Int16", "short"); - _ptypes.Add("System.Int32", "int"); - _ptypes.Add("System.Int64", "long"); - _ptypes.Add("System.Byte", "byte"); - _ptypes.Add("System.SByte", "byte"); - _ptypes.Add("System.Boolean", "boolean"); - _ptypes.Add("System.Char", "char"); - _ptypes.Add("System.Single", "float"); - _ptypes.Add("System.Double", "double"); - _ptypes.Add("System.UInt16", "int"); - _ptypes.Add("System.UInt32", "long"); - _ptypes.Add("System.UInt64", "long"); - _ptypes.Add("System.DateTime", "long"); - - _jmodis.Add("boolean"); - _jmodis.Add("extends"); - _jmodis.Add("final"); - _jmodis.Add("implements"); - _jmodis.Add("import"); - _jmodis.Add("instanceof"); - _jmodis.Add("native"); - _jmodis.Add("package"); - _jmodis.Add("strictfp"); - _jmodis.Add("String"); - _jmodis.Add("super"); - _jmodis.Add("synchronized"); - _jmodis.Add("throws"); - _jmodis.Add("transient"); - _jmodis.Add("array"); - _jmodis.Add("asm"); - _jmodis.Add("except"); - - _wtypes.Add("FILETIME", "IFILETIME"); - _wtypes.Add("STRICT", "ISTRICT"); - _wtypes.Add("NULL", "INULL"); - _wtypes.Add("ALTERNATE", "IALTERNATE"); - _wtypes.Add("delete", "implDelete"); - _wtypes.Add("register", "implRegister"); - } - - private static ArrayList _createdDirs = new ArrayList(); - - public static string Capitalize(string s) - { - if (s != null && s.Length > 0) - { - char [] c = s.ToCharArray(); - c[0] = Char.ToUpper(c[0]); - return new string(c); - } - else - return s; - } - - public static bool IsPrimitiveType(string name) - { - string p = (string)_ptypes[name]; - if (p == null) - return false; - else - return true; - } - - public static string GetPrimitiveType(string name) - { - return (string)_ptypes[name]; - } - - public static string GenerateNamespace(string className, bool isOpen) - { - int i = 0; - string[] names = className.Split(new Char[] { '.' }); - StringBuilder sb = new StringBuilder(); - - for (i = 0; i < names.Length - 1; i++) - { - if (isOpen) - { - sb.AppendFormat("namespace {0} {{\n", names[i]); - } - else - { - sb.Append('}'); - } - } - if (!isOpen) - { - string cn = ""; - for (i = 0; i < names.Length - 2; i++) - { - cn += names[i]; - cn += "::"; - } - cn += names[i]; - sb.AppendFormat(" // End of {0} Namespace declaration.", cn); - } - - - return sb.ToString(); - } - - public static void createDir(string nspace) - { - string[] paths = nspace.Split(new Char[] { '.' }); - string path = ""; - foreach (String p in paths) - { - path = path + p + "/"; - if (!Directory.Exists(path)) - Directory.CreateDirectory(path); - if (!_createdDirs.Contains(path)) - _createdDirs.Add(path); - } - } - - public static void dumpCreatedDirs(TextWriter wr) - { - if (_createdDirs.Count > 0) - { - wr.WriteLine(); - wr.WriteLine("$(BUILDIR):"); - IEnumerator e = _createdDirs.GetEnumerator(); - while (e.MoveNext()) - { - string path = (string)e.Current; - path = path.Replace('/', '\\'); - path = path.Substring(0, path.Length - 1); - wr.WriteLine("\t@$(MKDIR) $(BUILDIR)\\{0}", path); - } - wr.WriteLine(); - wr.WriteLine("{$(SRCDIR)}.cpp{$(BUILDIR)}.obj:"); - wr.WriteLine("\t$(CC) $(CFLAGS) $(INCLUDES) $(JAVA_INCLUDES) /Fo$(@D)\\ $(PDBFLAGS) $<"); - wr.WriteLine(); - e = _createdDirs.GetEnumerator(); - while (e.MoveNext()) - { - string path = (string)e.Current; - path = path.Replace('/', '\\'); - path = path.Substring(0, path.Length - 1); - wr.WriteLine("{{$(SRCDIR)\\{0}}}.cpp{{$(BUILDIR)\\{0}}}.obj:", path); - wr.WriteLine("\t$(CC) $(CFLAGS) $(INCLUDES) $(JAVA_INCLUDES) /Fo$(@D)\\ $(PDBFLAGS) $<"); - wr.WriteLine(); - } - } - } - - public static string getIncNsName(string name) - { - string r = name.Replace('.', '_'); - return r.ToUpper(); - } - - public static string getSafeNativeName(string name) - { - string r = (string)_wtypes[name]; - if (r == null) - return name; - else - return r; - } - - public static string GetSignature(ParameterInfo[] pi, string name) - { - if (name.StartsWith("System.") || name.StartsWith("Microsoft.")) - { - int x = name.LastIndexOf('.'); - string iiname = name.Substring(x + 1); - name = iiname; - } - - StringBuilder sb = new StringBuilder(name); - sb.Append('('); - foreach (ParameterInfo p in pi) - { - string fn = p.ParameterType.FullName; - if (p.ParameterType.IsArray) - { - sb.Append('['); - Type apt = p.ParameterType.GetElementType(); - if (apt.IsEnum) - sb.Append('I'); - else { - if (apt.IsArray) - { - sb.Append('['); - apt = apt.GetElementType(); - } - fn = apt.FullName; - string t = (string)_jtypes[fn]; - if (t != null) - sb.Append(t); - else - { - sb.Append('L'); - sb.Append(fn); - sb.Append(';'); - } - } - } - else if (p.ParameterType.IsEnum) - sb.Append('I'); - else - { - string t = (string)_jtypes[fn]; - if (t != null) - sb.Append(t); - else { - sb.Append('L'); - sb.Append(fn); - sb.Append(';'); - } - } - } - sb.Append(')'); - return sb.ToString(); - } - - public static void SortInterfaces(Type[] interfaces) - { - Array.Sort(interfaces, new InterfaceComparer()); - } - - public static string RN(string val) - { - if (_jmodis.Contains(val)) - return val + "Value"; - else - return val; - } - - private static Type[] getClassInterfaces(Type type) - { - ArrayList il = new ArrayList(); - if (type == null) - return null; - foreach (Type n in type.GetInterfaces()) - { - if (n.IsGenericType) - continue; - il.Add(n); - } - Type[] nested = getClassInterfaces(type.BaseType); - if (nested != null) - { - foreach (Type n in nested) - { - if (... [truncated message content] |
From: <jbo...@li...> - 2006-05-30 09:57:23
|
Author: wrzep Date: 2006-05-30 05:56:59 -0400 (Tue, 30 May 2006) New Revision: 4479 Modified: labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/StatusConfWatcher.java labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/StatusDescriptor.java labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/common/Constants.java Log: JBLAB-599 Cache interval works now fine (see http://jira.jboss.com/jira/browse/JBSHOTOKU-83). Pawel Modified: labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/StatusConfWatcher.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/StatusConfWatcher.java 2006-05-30 09:45:06 UTC (rev 4478) +++ labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/StatusConfWatcher.java 2006-05-30 09:56:59 UTC (rev 4479) @@ -32,7 +32,9 @@ public class StatusConfWatcher extends ShotokuResourceWatcher<String, StatusDescriptor> { - public StatusConfWatcher(long interval) {} + public StatusConfWatcher(long interval) { + super(interval); + } private StatusDescriptor getDesc(String portalName) { return new StatusDescriptor(portalName, getContentManager(portalName)); Modified: labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/StatusDescriptor.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/StatusDescriptor.java 2006-05-30 09:45:06 UTC (rev 4478) +++ labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/StatusDescriptor.java 2006-05-30 09:56:59 UTC (rev 4479) @@ -50,8 +50,6 @@ private Status status; - int updateCounter = 0; // temp update interval workaround - public StatusDescriptor(String portalName, ContentManager cm) { try { @@ -109,12 +107,6 @@ public void update() { - if (++updateCounter < 6) { // temp update interval workaround - return; - } else { - updateCounter = 0; - } - if (status.needsUpdate()) { fillContext(); } Modified: labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/common/Constants.java =================================================================== --- labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/common/Constants.java 2006-05-30 09:45:06 UTC (rev 4478) +++ labs/jbosslabs/trunk/portal-extensions/forge-status/src/java/org/jboss/forge/status/common/Constants.java 2006-05-30 09:56:59 UTC (rev 4479) @@ -16,7 +16,7 @@ public static final String STATUS_LOCAL_SERVICE = "Status/LocalScoresService"; public static final String STATUS_REMOTE_SERVICE = "Status/RemoteScoresService"; - public static final long CACHE_INTERVAL = 10*60*1000; /* milliseconds */ + public static final long CACHE_INTERVAL = 60*1000; /* milliseconds */ /** * This class cannot be instatiated. |
From: <jbo...@li...> - 2006-05-30 09:45:27
|
Author: kev...@jb... Date: 2006-05-30 05:45:06 -0400 (Tue, 30 May 2006) New Revision: 4478 Modified: labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/jboss.properties labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/weblogic.properties labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/webmethods.properties Log: Fixed licence header Modified: labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/jboss.properties =================================================================== --- labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/jboss.properties 2006-05-30 09:27:23 UTC (rev 4477) +++ labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/jboss.properties 2006-05-30 09:45:06 UTC (rev 4478) @@ -1,23 +1,23 @@ -# -# JBoss, Home of Professional Open Source -# Copyright 2006, JBoss Inc., and individual contributors as indicated -# by the @authors tag. All rights reserved. -# See the copyright.txt in the distribution for a full listing -# of individual contributors. -# This copyrighted material is made available to anyone wishing to use, -# modify, copy, or redistribute it subject to the terms and conditions -# of the GNU General Public License, v. 2.0. -# This program is distributed in the hope that it will be useful, but WITHOUT A -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more details. -# You should have received a copy of the GNU General Public License, -# v. 2.0 along with this distribution; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. -# -# (C) 2005-2006, -# @author JBoss Inc. -# +<!-- + JBoss, Home of Professional Open Source + Copyright 2006, JBoss Inc., and individual contributors as indicated + by the @authors tag. All rights reserved. + See the copyright.txt in the distribution for a full listing + of individual contributors. + This copyrighted material is made available to anyone wishing to use, + modify, copy, or redistribute it subject to the terms and conditions + of the GNU General Public License, v. 2.0. + This program is distributed in the hope that it will be useful, but WITHOUT A + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License, + v. 2.0 along with this distribution; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + (C) 2005-2006, + @author JBoss Inc. +--> <!-- JBoss property file The following variables should be replaced for JBoss deployment Modified: labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/weblogic.properties =================================================================== --- labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/weblogic.properties 2006-05-30 09:27:23 UTC (rev 4477) +++ labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/weblogic.properties 2006-05-30 09:45:06 UTC (rev 4478) @@ -1,23 +1,23 @@ -# -# JBoss, Home of Professional Open Source -# Copyright 2006, JBoss Inc., and individual contributors as indicated -# by the @authors tag. All rights reserved. -# See the copyright.txt in the distribution for a full listing -# of individual contributors. -# This copyrighted material is made available to anyone wishing to use, -# modify, copy, or redistribute it subject to the terms and conditions -# of the GNU General Public License, v. 2.0. -# This program is distributed in the hope that it will be useful, but WITHOUT A -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more details. -# You should have received a copy of the GNU General Public License, -# v. 2.0 along with this distribution; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. -# -# (C) 2005-2006, -# @author JBoss Inc. -# +<!-- + JBoss, Home of Professional Open Source + Copyright 2006, JBoss Inc., and individual contributors as indicated + by the @authors tag. All rights reserved. + See the copyright.txt in the distribution for a full listing + of individual contributors. + This copyrighted material is made available to anyone wishing to use, + modify, copy, or redistribute it subject to the terms and conditions + of the GNU General Public License, v. 2.0. + This program is distributed in the hope that it will be useful, but WITHOUT A + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License, + v. 2.0 along with this distribution; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + (C) 2005-2006, + @author JBoss Inc. +--> <!-- WebLogic property file The following variables should be replaced for WebLogic deployment Modified: labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/webmethods.properties =================================================================== --- labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/webmethods.properties 2006-05-30 09:27:23 UTC (rev 4477) +++ labs/jbosstm/tags/JBOSSTS_4_2_1_BETA/XTS/demo/webmethods.properties 2006-05-30 09:45:06 UTC (rev 4478) @@ -1,23 +1,23 @@ -# -# JBoss, Home of Professional Open Source -# Copyright 2006, JBoss Inc., and individual contributors as indicated -# by the @authors tag. All rights reserved. -# See the copyright.txt in the distribution for a full listing -# of individual contributors. -# This copyrighted material is made available to anyone wishing to use, -# modify, copy, or redistribute it subject to the terms and conditions -# of the GNU General Public License, v. 2.0. -# This program is distributed in the hope that it will be useful, but WITHOUT A -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more details. -# You should have received a copy of the GNU General Public License, -# v. 2.0 along with this distribution; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. -# -# (C) 2005-2006, -# @author JBoss Inc. -# +<!-- + JBoss, Home of Professional Open Source + Copyright 2006, JBoss Inc., and individual contributors as indicated + by the @authors tag. All rights reserved. + See the copyright.txt in the distribution for a full listing + of individual contributors. + This copyrighted material is made available to anyone wishing to use, + modify, copy, or redistribute it subject to the terms and conditions + of the GNU General Public License, v. 2.0. + This program is distributed in the hope that it will be useful, but WITHOUT A + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License, + v. 2.0 along with this distribution; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + (C) 2005-2006, + @author JBoss Inc. +--> <!-- Webmethod property file The following variables should be replaced for webMethods deployment |
From: <jbo...@li...> - 2006-05-30 09:27:32
|
Author: kev...@jb... Date: 2006-05-30 05:27:23 -0400 (Tue, 30 May 2006) New Revision: 4477 Modified: labs/jbosstm/trunk/XTS/demo/jboss.properties labs/jbosstm/trunk/XTS/demo/weblogic.properties labs/jbosstm/trunk/XTS/demo/webmethods.properties Log: Fixed licence header Modified: labs/jbosstm/trunk/XTS/demo/jboss.properties =================================================================== --- labs/jbosstm/trunk/XTS/demo/jboss.properties 2006-05-30 06:16:32 UTC (rev 4476) +++ labs/jbosstm/trunk/XTS/demo/jboss.properties 2006-05-30 09:27:23 UTC (rev 4477) @@ -1,23 +1,23 @@ -# -# JBoss, Home of Professional Open Source -# Copyright 2006, JBoss Inc., and individual contributors as indicated -# by the @authors tag. All rights reserved. -# See the copyright.txt in the distribution for a full listing -# of individual contributors. -# This copyrighted material is made available to anyone wishing to use, -# modify, copy, or redistribute it subject to the terms and conditions -# of the GNU General Public License, v. 2.0. -# This program is distributed in the hope that it will be useful, but WITHOUT A -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more details. -# You should have received a copy of the GNU General Public License, -# v. 2.0 along with this distribution; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. -# -# (C) 2005-2006, -# @author JBoss Inc. -# +<!-- + JBoss, Home of Professional Open Source + Copyright 2006, JBoss Inc., and individual contributors as indicated + by the @authors tag. All rights reserved. + See the copyright.txt in the distribution for a full listing + of individual contributors. + This copyrighted material is made available to anyone wishing to use, + modify, copy, or redistribute it subject to the terms and conditions + of the GNU General Public License, v. 2.0. + This program is distributed in the hope that it will be useful, but WITHOUT A + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License, + v. 2.0 along with this distribution; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + (C) 2005-2006, + @author JBoss Inc. +--> <!-- JBoss property file The following variables should be replaced for JBoss deployment Modified: labs/jbosstm/trunk/XTS/demo/weblogic.properties =================================================================== --- labs/jbosstm/trunk/XTS/demo/weblogic.properties 2006-05-30 06:16:32 UTC (rev 4476) +++ labs/jbosstm/trunk/XTS/demo/weblogic.properties 2006-05-30 09:27:23 UTC (rev 4477) @@ -1,23 +1,23 @@ -# -# JBoss, Home of Professional Open Source -# Copyright 2006, JBoss Inc., and individual contributors as indicated -# by the @authors tag. All rights reserved. -# See the copyright.txt in the distribution for a full listing -# of individual contributors. -# This copyrighted material is made available to anyone wishing to use, -# modify, copy, or redistribute it subject to the terms and conditions -# of the GNU General Public License, v. 2.0. -# This program is distributed in the hope that it will be useful, but WITHOUT A -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more details. -# You should have received a copy of the GNU General Public License, -# v. 2.0 along with this distribution; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. -# -# (C) 2005-2006, -# @author JBoss Inc. -# +<!-- + JBoss, Home of Professional Open Source + Copyright 2006, JBoss Inc., and individual contributors as indicated + by the @authors tag. All rights reserved. + See the copyright.txt in the distribution for a full listing + of individual contributors. + This copyrighted material is made available to anyone wishing to use, + modify, copy, or redistribute it subject to the terms and conditions + of the GNU General Public License, v. 2.0. + This program is distributed in the hope that it will be useful, but WITHOUT A + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License, + v. 2.0 along with this distribution; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + (C) 2005-2006, + @author JBoss Inc. +--> <!-- WebLogic property file The following variables should be replaced for WebLogic deployment Modified: labs/jbosstm/trunk/XTS/demo/webmethods.properties =================================================================== --- labs/jbosstm/trunk/XTS/demo/webmethods.properties 2006-05-30 06:16:32 UTC (rev 4476) +++ labs/jbosstm/trunk/XTS/demo/webmethods.properties 2006-05-30 09:27:23 UTC (rev 4477) @@ -1,23 +1,23 @@ -# -# JBoss, Home of Professional Open Source -# Copyright 2006, JBoss Inc., and individual contributors as indicated -# by the @authors tag. All rights reserved. -# See the copyright.txt in the distribution for a full listing -# of individual contributors. -# This copyrighted material is made available to anyone wishing to use, -# modify, copy, or redistribute it subject to the terms and conditions -# of the GNU General Public License, v. 2.0. -# This program is distributed in the hope that it will be useful, but WITHOUT A -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the GNU General Public License for more details. -# You should have received a copy of the GNU General Public License, -# v. 2.0 along with this distribution; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. -# -# (C) 2005-2006, -# @author JBoss Inc. -# +<!-- + JBoss, Home of Professional Open Source + Copyright 2006, JBoss Inc., and individual contributors as indicated + by the @authors tag. All rights reserved. + See the copyright.txt in the distribution for a full listing + of individual contributors. + This copyrighted material is made available to anyone wishing to use, + modify, copy, or redistribute it subject to the terms and conditions + of the GNU General Public License, v. 2.0. + This program is distributed in the hope that it will be useful, but WITHOUT A + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License, + v. 2.0 along with this distribution; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + + (C) 2005-2006, + @author JBoss Inc. +--> <!-- Webmethod property file The following variables should be replaced for webMethods deployment |
From: <jbo...@li...> - 2006-05-30 06:16:37
|
Author: mla...@jb... Date: 2006-05-30 02:16:32 -0400 (Tue, 30 May 2006) New Revision: 4476 Modified: labs/jbossweb/trunk/build.xml Log: Add missing wildchar star for script resources. Modified: labs/jbossweb/trunk/build.xml =================================================================== --- labs/jbossweb/trunk/build.xml 2006-05-29 23:38:24 UTC (rev 4475) +++ labs/jbossweb/trunk/build.xml 2006-05-30 06:16:32 UTC (rev 4476) @@ -251,8 +251,8 @@ </copy> <copy todir="${jbossweb.build}/${final.name}/bin" filtering="yes" overwrite="yes"> <fileset dir="src/share/resources/bin"> - <include name="**/.bat"/> - <include name="**/.sh"/> + <include name="**/*.bat"/> + <include name="**/*.sh"/> </fileset> </copy> <copy todir="${jbossweb.build}/${final.name}/bin" overwrite="yes"> |
From: <jbo...@li...> - 2006-05-29 23:38:29
|
Author: KrisVerlaenen Date: 2006-05-29 19:38:24 -0400 (Mon, 29 May 2006) New Revision: 4475 Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java Log: disabled java code completion for consequences Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java 2006-05-29 23:19:19 UTC (rev 4474) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java 2006-05-29 23:38:24 UTC (rev 4475) @@ -98,7 +98,7 @@ list, prefix ); - addRHSJavaCompletionProposals(list, backText, prefix); +// addRHSJavaCompletionProposals(list, backText, prefix); } } else if (condition(backText)) { List dslConditions = adapter.listConditionItems(); |
From: <jbo...@li...> - 2006-05-29 23:19:26
|
Author: KrisVerlaenen Date: 2006-05-29 19:19:19 -0400 (Mon, 29 May 2006) New Revision: 4474 Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/DroolsIDEPlugin.java labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLReconcilingStrategy.java labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLRuleEditor.java labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/DefaultCompletionProcessor.java labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/outline/RuleContentOutlinePage.java labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/preferences/DroolsPreferencePage.java labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/preferences/IDroolsConstants.java Log: added folding in DRL editor + fixed error with newlines Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/DroolsIDEPlugin.java =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/DroolsIDEPlugin.java 2006-05-29 17:52:37 UTC (rev 4473) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/DroolsIDEPlugin.java 2006-05-29 23:19:19 UTC (rev 4474) @@ -163,6 +163,7 @@ protected void initializeDefaultPreferences(IPreferenceStore store) { store.setDefault(IDroolsConstants.BUILD_ALL, false); + store.setDefault(IDroolsConstants.EDITOR_FOLDING, true); } } Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLReconcilingStrategy.java =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLReconcilingStrategy.java 2006-05-29 17:52:37 UTC (rev 4473) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLReconcilingStrategy.java 2006-05-29 23:19:19 UTC (rev 4474) @@ -1,10 +1,18 @@ package org.drools.ide.editors; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.StringReader; +import java.util.ArrayList; import java.util.Iterator; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; -import org.drools.ide.builder.DroolsBuildMarker; -import org.drools.ide.builder.DroolsBuilder; +import org.drools.ide.DroolsIDEPlugin; +import org.drools.ide.preferences.IDroolsConstants; import org.eclipse.core.resources.IFile; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.text.IDocument; import org.eclipse.jface.text.IRegion; import org.eclipse.jface.text.Position; @@ -13,50 +21,73 @@ import org.eclipse.jface.text.source.Annotation; import org.eclipse.jface.text.source.IAnnotationModel; import org.eclipse.jface.text.source.ISourceViewer; -import org.eclipse.ui.IEditorInput; -import org.eclipse.ui.IFileEditorInput; -import org.eclipse.ui.texteditor.IDocumentProvider; +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.swt.widgets.Display; public class DRLReconcilingStrategy implements IReconcilingStrategy { + private static final Pattern RULE_PATTERN = Pattern.compile("\\s*rule\\s+\"?([^\"]+)\"?.*", Pattern.DOTALL); + private static final Pattern QUERY_PATTERN = Pattern.compile("\\s*query\\s+\"?([^\"]+)\"?.*", Pattern.DOTALL); + private static final Pattern FUNCTION_PATTERN = Pattern.compile("\\s*function\\s+(.*)\\s+(.*)\\(.*\\).*", Pattern.DOTALL); + private static final Pattern END_PATTERN = Pattern.compile("\\s*end.*", Pattern.DOTALL); + private static final Pattern IMPORT_PATTERN = Pattern.compile("\\s*import\\s.*", Pattern.DOTALL); + private ISourceViewer sourceViewer; private DRLRuleEditor editor; + private IDocument document; + private boolean folding; - public DRLReconcilingStrategy(ISourceViewer sourceViewer, DRLRuleEditor editor) { + public DRLReconcilingStrategy(ISourceViewer sourceViewer, final DRLRuleEditor editor) { this.sourceViewer = sourceViewer; this.editor = editor; - } + IPreferenceStore preferenceStore = DroolsIDEPlugin.getDefault().getPreferenceStore(); + folding = preferenceStore.getBoolean(IDroolsConstants.EDITOR_FOLDING); + preferenceStore.addPropertyChangeListener(new IPropertyChangeListener() { + public void propertyChange(PropertyChangeEvent event) { + if (IDroolsConstants.EDITOR_FOLDING.equals(event.getProperty())) { + folding = ((Boolean) event.getNewValue()).booleanValue(); + if (folding) { + reconcile(); + } else { + Display.getDefault().asyncExec(new Runnable() { + public void run() { + editor.updateFoldingStructure(new ArrayList()); + } + }); + } + } + } + }); + } public void setDocument(IDocument document) { + this.document = document; + reconcile(); } public void reconcile(DirtyRegion dirtyRegion, IRegion region) { - //reconcile(); + reconcile(); } public void reconcile(IRegion region) { - //reconcile(); + reconcile(); } private void reconcile() { - IEditorInput input = editor.getEditorInput(); - if (input != null) { - if (!(input instanceof IFileEditorInput)) { - return; - } - IFile file = ((IFileEditorInput) input).getFile(); - IAnnotationModel annotationModel = sourceViewer.getAnnotationModel(); - removeAnnotationsFor(annotationModel); - - IDocumentProvider documentProvider = editor.getDocumentProvider(); - if (documentProvider == null) { - return; + if (document != null) { + String s = document.get(); + if (folding) { + calculateFolding(s); } - String s = documentProvider.getDocument(input).get(); - DroolsBuildMarker[] markers = DroolsBuilder.parseFile(file, s); - for (int i = 0; i < markers.length; i++) { - createAnnotation(file, annotationModel, markers[i].getText(), markers[i].getOffset(), markers[i].getLength()); - } + +// IFile file = ((IFileEditorInput) input).getFile(); +// IAnnotationModel annotationModel = sourceViewer.getAnnotationModel(); +// removeAnnotationsFor(annotationModel); +// DroolsBuildMarker[] markers = DroolsBuilder.parseFile(file, s); +// for (int i = 0; i < markers.length; i++) { +// createAnnotation(file, annotationModel, markers[i].getText(), markers[i].getOffset(), markers[i].getLength()); +// } } } @@ -71,8 +102,118 @@ Iterator iterator = annotationModel.getAnnotationIterator(); while (iterator.hasNext()) { Annotation annotation = (Annotation) iterator.next(); - if (annotation instanceof DRLProblemAnnotation) + if (annotation instanceof DRLProblemAnnotation) { annotationModel.removeAnnotation(annotation); - }; + } + } } + + protected void calculateFolding(String input) { + // TODO replace this parsing by getting this input from the parsed rule file + final List positions = new ArrayList(); + StringReader stringReader = new StringReader( input ); + BufferedReader bufferedReader = new BufferedReader( stringReader ); + try { + int offset = 0; + String st = bufferedReader.readLine(); + int start = -1; + while ( st != null ) { + Matcher matcher = RULE_PATTERN.matcher(st); + if (matcher.matches()) { + start = offset + matcher.start(); + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + while (st != null) { + Matcher matcher2 = END_PATTERN.matcher(st); + if (matcher2.matches()) { + int end = offset + matcher2.end(); + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + positions.add(new Position(start, end - start + (st == null ? 0 : System.getProperty("line.separator").length()))); // + for the newline + break; + } + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + } + } else { + matcher = QUERY_PATTERN.matcher(st); + if (matcher.matches()) { + start = offset + matcher.start(); + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + while (st != null) { + Matcher matcher2 = END_PATTERN.matcher(st); + if (matcher2.matches()) { + int end = offset + matcher2.end(); + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + positions.add(new Position(start, end - start + (st == null ? 0 : System.getProperty("line.separator").length()))); // + for the newline + break; + } + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + } + } else { + matcher = FUNCTION_PATTERN.matcher(st); + if (matcher.matches()) { + start = offset + matcher.start(); + int nbOpenBrackets = 1; + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + while (st != null) { + byte[] bytes = st.getBytes(); + for (int i = 0; i < bytes.length; i++) { + if (bytes[i] == '{') { + nbOpenBrackets++; + } else if (bytes[i] == '}') { + if (--nbOpenBrackets == 0) { + int end = offset + i + 1; + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + positions.add(new Position(start, end - start + (st == null ? 0 : System.getProperty("line.separator").length()))); // + for the newline + break; + } + } + } + if (nbOpenBrackets == 0) { + break; + } + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + } + } else { + matcher = IMPORT_PATTERN.matcher(st); + if (matcher.matches()) { + start = offset + matcher.start(); + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + while (st != null) { + Matcher matcher2 = IMPORT_PATTERN.matcher(st); + if (!matcher2.matches()) { + int end = offset; + positions.add(new Position(start, end - start)); + break; + } + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + } + } else { + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline + st = bufferedReader.readLine(); + } + } + } + } + } + } catch ( IOException e ) { + // do nothing + } + + Display.getDefault().asyncExec(new Runnable() { + public void run() { + editor.updateFoldingStructure(positions); + } + }); + } + } \ No newline at end of file Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLRuleEditor.java =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLRuleEditor.java 2006-05-29 17:52:37 UTC (rev 4473) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/DRLRuleEditor.java 2006-05-29 23:19:19 UTC (rev 4474) @@ -1,5 +1,6 @@ package org.drools.ide.editors; +import java.util.HashMap; import java.util.List; import org.drools.ide.DroolsIDEPlugin; @@ -13,7 +14,14 @@ import org.eclipse.jface.action.IAction; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.source.Annotation; import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.jface.text.source.IVerticalRuler; +import org.eclipse.jface.text.source.projection.ProjectionAnnotation; +import org.eclipse.jface.text.source.projection.ProjectionAnnotationModel; +import org.eclipse.jface.text.source.projection.ProjectionSupport; +import org.eclipse.jface.text.source.projection.ProjectionViewer; +import org.eclipse.swt.widgets.Composite; import org.eclipse.ui.editors.text.TextEditor; import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds; import org.eclipse.ui.texteditor.TextOperationAction; @@ -32,11 +40,48 @@ private List functions; private RuleContentOutlinePage ruleContentOutline = null; + private Annotation[] oldAnnotations; + private ProjectionAnnotationModel annotationModel; + public DRLRuleEditor() { setSourceViewerConfiguration(new DRLSourceViewerConfig(this)); setDocumentProvider(new DRLDocumentProvider()); } + public void createPartControl(Composite parent) { + super.createPartControl(parent); + ProjectionViewer viewer = (ProjectionViewer) getSourceViewer(); + ProjectionSupport projectionSupport = new ProjectionSupport(viewer, + getAnnotationAccess(), getSharedColors()); + projectionSupport.install(); + // turn projection mode on + viewer.doOperation(ProjectionViewer.TOGGLE); + annotationModel = viewer.getProjectionAnnotationModel(); + } + + protected ISourceViewer createSourceViewer(Composite parent, + IVerticalRuler ruler, int styles) { + ISourceViewer viewer = new ProjectionViewer(parent, ruler, + getOverviewRuler(), isOverviewRulerVisible(), styles); + // ensure decoration support has been created and configured. + getSourceViewerDecorationSupport(viewer); + return viewer; + } + + public void updateFoldingStructure(List positions) { + Annotation[] annotations = new Annotation[positions.size()]; + // this will hold the new annotations along + // with their corresponding positions + HashMap newAnnotations = new HashMap(); + for (int i = 0; i < positions.size(); i++) { + ProjectionAnnotation annotation = new ProjectionAnnotation(); + newAnnotations.put(annotation, positions.get(i)); + annotations[i] = annotation; + } + annotationModel.modifyAnnotations(oldAnnotations, newAnnotations, null); + oldAnnotations = annotations; + } + /** For user triggered content assistance */ protected void createActions() { super.createActions(); Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/DefaultCompletionProcessor.java =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/DefaultCompletionProcessor.java 2006-05-29 17:52:37 UTC (rev 4473) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/DefaultCompletionProcessor.java 2006-05-29 23:19:19 UTC (rev 4474) @@ -30,9 +30,9 @@ */ public class DefaultCompletionProcessor extends AbstractCompletionProcessor { - private static final String NEW_RULE_TEMPLATE = "rule \"new rule\"\n\n\twhen\n\n\tthen\n\nend"; - private static final String NEW_QUERY_TEMPLATE = "query \"query name\"\n\t#conditions\nend"; - private static final String NEW_FUNCTION_TEMPLATE = "function void yourFunction(Type arg) {\n\t/* code goes here*/\n}"; + private static final String NEW_RULE_TEMPLATE = "rule \"new rule\"" + System.getProperty("line.separator") + "\twhen" + System.getProperty("line.separator") + "\t\t" + System.getProperty("line.separator") + "\tthen" + System.getProperty("line.separator") + "\t\t" + System.getProperty("line.separator") + "end"; + private static final String NEW_QUERY_TEMPLATE = "query \"query name\"" + System.getProperty("line.separator") + "\t#conditions" + System.getProperty("line.separator") + "end"; + private static final String NEW_FUNCTION_TEMPLATE = "function void yourFunction(Type arg) {" + System.getProperty("line.separator") + "\t/* code goes here*/" + System.getProperty("line.separator") + "}"; private static final Pattern IMPORT_PATTERN = Pattern.compile(".*\\Wimport\\W[^;]*", Pattern.DOTALL); public DefaultCompletionProcessor(EditorPart editor) { Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java 2006-05-29 17:52:37 UTC (rev 4473) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/completion/RuleCompletionProcessor.java 2006-05-29 23:19:19 UTC (rev 4474) @@ -98,7 +98,7 @@ list, prefix ); - // addRHSJavaCompletionProposals(list, backText, prefix); + addRHSJavaCompletionProposals(list, backText, prefix); } } else if (condition(backText)) { List dslConditions = adapter.listConditionItems(); @@ -152,7 +152,7 @@ list.add(p); } } - prop = new RuleCompletionProposal(prefix.length(), "then", "then\n\t"); + prop = new RuleCompletionProposal(prefix.length(), "then", "then" + System.getProperty("line.separator") + "\t"); prop.setImage(droolsIcon); list.add(prop); break; @@ -263,7 +263,6 @@ // do nothing } String consequence = backText.substring(thenPosition + 4); - System.out.println(consequence); list.addAll(getRHSJavaCompletionProposals(consequence, prefix)); } @@ -308,7 +307,6 @@ if (imports != null && imports.size() > 0) { evalContext.setImports((String[]) imports.toArray(new String[imports.size()])); } - // TODO set variables evalContext.codeComplete(consequenceStart, consequenceStart.length(), requestor); } catch (Throwable t) { DroolsIDEPlugin.log(t); @@ -324,7 +322,7 @@ list.add(new RuleCompletionProposal(prefix.length(), "agenda-group", "agenda-group ", droolsIcon)); list.add(new RuleCompletionProposal(prefix.length(), "duration", "duration ", droolsIcon)); list.add(new RuleCompletionProposal(prefix.length(), "auto-focus", "auto-focus ", droolsIcon)); - list.add(new RuleCompletionProposal(prefix.length(), "when", "when\n\t ", droolsIcon)); + list.add(new RuleCompletionProposal(prefix.length(), "when", "when" + System.getProperty("line.separator") + "\t ", droolsIcon)); list.add(new RuleCompletionProposal(prefix.length(), "activation-group", "activation-group ", droolsIcon)); } Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/outline/RuleContentOutlinePage.java =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/outline/RuleContentOutlinePage.java 2006-05-29 17:52:37 UTC (rev 4473) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/editors/outline/RuleContentOutlinePage.java 2006-05-29 23:19:19 UTC (rev 4474) @@ -183,7 +183,7 @@ st.length() ); } - offset += st.length() + 2; //+2 for the newline + offset += st.length() + System.getProperty("line.separator").length(); // + for the newline } } catch ( IOException e ) { } Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/preferences/DroolsPreferencePage.java =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/preferences/DroolsPreferencePage.java 2006-05-29 17:52:37 UTC (rev 4473) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/preferences/DroolsPreferencePage.java 2006-05-29 23:19:19 UTC (rev 4474) @@ -14,10 +14,13 @@ public class DroolsPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { private Button buildAllCheckBox; + private Button collapseEditorCheckBox; protected Control createContents(Composite parent) { buildAllCheckBox = createCheckBox(parent, "Automatically reparse all rules if a Java resource is changed."); + collapseEditorCheckBox = createCheckBox(parent, + "Use code folding in DRL editor."); initializeValues(); @@ -39,11 +42,13 @@ private void initializeDefaults() { IPreferenceStore store = getPreferenceStore(); buildAllCheckBox.setSelection(store.getDefaultBoolean(IDroolsConstants.BUILD_ALL)); + collapseEditorCheckBox.setSelection(store.getDefaultBoolean(IDroolsConstants.EDITOR_FOLDING)); } private void initializeValues() { IPreferenceStore store = getPreferenceStore(); buildAllCheckBox.setSelection(store.getBoolean(IDroolsConstants.BUILD_ALL)); + collapseEditorCheckBox.setSelection(store.getBoolean(IDroolsConstants.EDITOR_FOLDING)); } protected void performDefaults() { @@ -60,11 +65,10 @@ private void storeValues() { IPreferenceStore store = getPreferenceStore(); store.setValue(IDroolsConstants.BUILD_ALL, buildAllCheckBox.getSelection()); + store.setValue(IDroolsConstants.EDITOR_FOLDING, collapseEditorCheckBox.getSelection()); } public void init(IWorkbench workbench) { // do nothing } - - } Modified: labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/preferences/IDroolsConstants.java =================================================================== --- labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/preferences/IDroolsConstants.java 2006-05-29 17:52:37 UTC (rev 4473) +++ labs/jbossrules/trunk/drools-ide/src/main/java/org/drools/ide/preferences/IDroolsConstants.java 2006-05-29 23:19:19 UTC (rev 4474) @@ -3,5 +3,6 @@ public interface IDroolsConstants { String BUILD_ALL = "Drools.BuildAll"; + String EDITOR_FOLDING = "Drools.EditorFolding"; } |
From: <jbo...@li...> - 2006-05-29 17:52:44
|
Author: mla...@jb... Date: 2006-05-29 13:52:37 -0400 (Mon, 29 May 2006) New Revision: 4473 Modified: labs/jbossweb/trunk/build.xml Log: Make sure the binary resource are not going trough ant filecopy filter. Modified: labs/jbossweb/trunk/build.xml =================================================================== --- labs/jbossweb/trunk/build.xml 2006-05-29 17:47:15 UTC (rev 4472) +++ labs/jbossweb/trunk/build.xml 2006-05-29 17:52:37 UTC (rev 4473) @@ -251,9 +251,15 @@ </copy> <copy todir="${jbossweb.build}/${final.name}/bin" filtering="yes" overwrite="yes"> <fileset dir="src/share/resources/bin"> - <include name="**.*"/> + <include name="**/.bat"/> + <include name="**/.sh"/> </fileset> </copy> + <copy todir="${jbossweb.build}/${final.name}/bin" overwrite="yes"> + <fileset dir="src/share/resources/bin"> + <include name="**/*.ico"/> + </fileset> + </copy> <chmod dir="${jbossweb.build}/${final.name}/bin" includes="*.sh" perm="+x"/> <!-- JBoss Web Main --> |
From: <jbo...@li...> - 2006-05-29 17:47:25
|
Author: mla...@jb... Date: 2006-05-29 13:47:15 -0400 (Mon, 29 May 2006) New Revision: 4472 Modified: labs/jbossweb/trunk/src/share/resources/bin/run.bat labs/jbossweb/trunk/src/share/resources/bin/service.bat Log: Update EOL style for .bat scripts Modified: labs/jbossweb/trunk/src/share/resources/bin/run.bat =================================================================== --- labs/jbossweb/trunk/src/share/resources/bin/run.bat 2006-05-29 17:31:05 UTC (rev 4471) +++ labs/jbossweb/trunk/src/share/resources/bin/run.bat 2006-05-29 17:47:15 UTC (rev 4472) @@ -1,108 +1,108 @@ -@echo off -rem ------------------------------------------------------------------------- -rem JBoss Bootstrap Script for Win32 -rem ------------------------------------------------------------------------- - -rem $Id$ - -@if not "%ECHO%" == "" echo %ECHO% -@if "%OS%" == "Windows_NT" setlocal - -set DIRNAME=.\ -if "%OS%" == "Windows_NT" set DIRNAME=%~dp0% -set PROGNAME=run.bat -if "%OS%" == "Windows_NT" set PROGNAME=%~nx0% - -set PATH=%DIRNAME%\native;%PATH% -rem Read all command line arguments - -REM -REM The %ARGS% env variable commented out in favor of using %* to include -REM all args in java command line. See bug #840239. [jpl] -REM -REM set ARGS= -REM :loop -REM if [%1] == [] goto endloop -REM set ARGS=%ARGS% %1 -REM shift -REM goto loop -REM :endloop - -rem Find run.jar, or we can't continue - -set RUNJAR=%DIRNAME%\run.jar -if exist "%RUNJAR%" goto FOUND_RUN_JAR -echo Could not locate %RUNJAR%. Please check that you are in the -echo bin directory when running this script. -goto END - -:FOUND_RUN_JAR - -if not "%JAVA_HOME%" == "" goto ADD_TOOLS - -set JAVA=java - -echo JAVA_HOME is not set. Unexpected results may occur. -echo Set JAVA_HOME to the directory of your local JDK to avoid this message. -goto SKIP_TOOLS - -:ADD_TOOLS - -set JAVA=%JAVA_HOME%\bin\java - -if exist "%JAVA_HOME%\lib\tools.jar" goto SKIP_TOOLS -echo Could not locate %JAVA_HOME%\lib\tools.jar. Unexpected results may occur. -echo Make sure that JAVA_HOME points to a JDK and not a JRE. - -:SKIP_TOOLS - -rem Include the JDK javac compiler for JSP pages. The default is for a Sun JDK -rem compatible distribution to which JAVA_HOME points - -set JAVAC_JAR=%JAVA_HOME%\lib\tools.jar - -rem If JBOSS_CLASSPATH is empty, don't include it, as this will -rem result in including the local directory, which makes error tracking -rem harder. -if "%JBOSS_CLASSPATH%" == "" ( - set JBOSS_CLASSPATH=%JAVAC_JAR%;%RUNJAR% -) ELSE ( - set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JAVAC_JAR%;%RUNJAR% -) - -rem Setup JBoss specific properties -set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% -set JBOSS_HOME=%DIRNAME%\.. - -rem Sun JVM memory allocation pool parameters. Modify as appropriate. -set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m - -rem JPDA options. Uncomment and modify as appropriate to enable remote debugging. -rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS% - -rem Setup the java endorsed dirs -set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed - -echo =============================================================================== -echo . -echo JBoss Web Server @VERSION@ Bootstrap Environment -echo . -echo JBOSS_HOME: %JBOSS_HOME% -echo . -echo JAVA: %JAVA% -echo . -echo JAVA_OPTS: %JAVA_OPTS% -echo . -echo CLASSPATH: %JBOSS_CLASSPATH% -echo . -echo =============================================================================== -echo . - -:RESTART -"%JAVA%" %JAVA_OPTS% "-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%" -classpath "%JBOSS_CLASSPATH%" org.jboss.Main %* -IF ERRORLEVEL 10 GOTO RESTART - -:END -if "%NOPAUSE%" == "" pause - -:END_NO_PAUSE +@echo off +rem ------------------------------------------------------------------------- +rem JBoss Bootstrap Script for Win32 +rem ------------------------------------------------------------------------- + +rem $Id$ + +@if not "%ECHO%" == "" echo %ECHO% +@if "%OS%" == "Windows_NT" setlocal + +set DIRNAME=.\ +if "%OS%" == "Windows_NT" set DIRNAME=%~dp0% +set PROGNAME=run.bat +if "%OS%" == "Windows_NT" set PROGNAME=%~nx0% + +set PATH=%DIRNAME%\native;%PATH% +rem Read all command line arguments + +REM +REM The %ARGS% env variable commented out in favor of using %* to include +REM all args in java command line. See bug #840239. [jpl] +REM +REM set ARGS= +REM :loop +REM if [%1] == [] goto endloop +REM set ARGS=%ARGS% %1 +REM shift +REM goto loop +REM :endloop + +rem Find run.jar, or we can't continue + +set RUNJAR=%DIRNAME%\run.jar +if exist "%RUNJAR%" goto FOUND_RUN_JAR +echo Could not locate %RUNJAR%. Please check that you are in the +echo bin directory when running this script. +goto END + +:FOUND_RUN_JAR + +if not "%JAVA_HOME%" == "" goto ADD_TOOLS + +set JAVA=java + +echo JAVA_HOME is not set. Unexpected results may occur. +echo Set JAVA_HOME to the directory of your local JDK to avoid this message. +goto SKIP_TOOLS + +:ADD_TOOLS + +set JAVA=%JAVA_HOME%\bin\java + +if exist "%JAVA_HOME%\lib\tools.jar" goto SKIP_TOOLS +echo Could not locate %JAVA_HOME%\lib\tools.jar. Unexpected results may occur. +echo Make sure that JAVA_HOME points to a JDK and not a JRE. + +:SKIP_TOOLS + +rem Include the JDK javac compiler for JSP pages. The default is for a Sun JDK +rem compatible distribution to which JAVA_HOME points + +set JAVAC_JAR=%JAVA_HOME%\lib\tools.jar + +rem If JBOSS_CLASSPATH is empty, don't include it, as this will +rem result in including the local directory, which makes error tracking +rem harder. +if "%JBOSS_CLASSPATH%" == "" ( + set JBOSS_CLASSPATH=%JAVAC_JAR%;%RUNJAR% +) ELSE ( + set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;%JAVAC_JAR%;%RUNJAR% +) + +rem Setup JBoss specific properties +set JAVA_OPTS=%JAVA_OPTS% -Dprogram.name=%PROGNAME% +set JBOSS_HOME=%DIRNAME%\.. + +rem Sun JVM memory allocation pool parameters. Modify as appropriate. +set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m + +rem JPDA options. Uncomment and modify as appropriate to enable remote debugging. +rem set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y %JAVA_OPTS% + +rem Setup the java endorsed dirs +set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed + +echo =============================================================================== +echo . +echo JBoss Web Server @VERSION@ Bootstrap Environment +echo . +echo JBOSS_HOME: %JBOSS_HOME% +echo . +echo JAVA: %JAVA% +echo . +echo JAVA_OPTS: %JAVA_OPTS% +echo . +echo CLASSPATH: %JBOSS_CLASSPATH% +echo . +echo =============================================================================== +echo . + +:RESTART +"%JAVA%" %JAVA_OPTS% "-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%" -classpath "%JBOSS_CLASSPATH%" org.jboss.Main %* +IF ERRORLEVEL 10 GOTO RESTART + +:END +if "%NOPAUSE%" == "" pause + +:END_NO_PAUSE Property changes on: labs/jbossweb/trunk/src/share/resources/bin/run.bat ___________________________________________________________________ Name: svn:eol-style - native + CRLF Modified: labs/jbossweb/trunk/src/share/resources/bin/service.bat =================================================================== --- labs/jbossweb/trunk/src/share/resources/bin/service.bat 2006-05-29 17:31:05 UTC (rev 4471) +++ labs/jbossweb/trunk/src/share/resources/bin/service.bat 2006-05-29 17:47:15 UTC (rev 4472) @@ -3,7 +3,7 @@ REM REM Distributable under LGPL license. REM See terms of license at gnu.org. -REM +REM @if not "%ECHO%" == "" echo %ECHO% @if "%OS%" == "Windows_NT" setlocal |
From: <jbo...@li...> - 2006-05-29 17:31:10
|
Author: mla...@jb... Date: 2006-05-29 13:31:05 -0400 (Mon, 29 May 2006) New Revision: 4471 Modified: labs/jbossweb/trunk/src/windows/native/service/jbosssvc/jboss.c Log: Make sure the remove works with correct arguments Modified: labs/jbossweb/trunk/src/windows/native/service/jbosssvc/jboss.c =================================================================== --- labs/jbossweb/trunk/src/windows/native/service/jbosssvc/jboss.c 2006-05-29 17:27:56 UTC (rev 4470) +++ labs/jbossweb/trunk/src/windows/native/service/jbosssvc/jboss.c 2006-05-29 17:31:05 UTC (rev 4471) @@ -786,7 +786,7 @@ int l = lstrlen(argv[i]); lstrcpy(_working_path, argv[i++]); /* Remove trailing backslash */ - if (_working_path[l - 1] == '\\') + if (l > 0 && _working_path[l - 1] == '\\') _working_path[l - 1] == '\0' } if (need_disp) |
From: <jbo...@li...> - 2006-05-29 17:28:03
|
Author: mla...@jb... Date: 2006-05-29 13:27:56 -0400 (Mon, 29 May 2006) New Revision: 4470 Modified: labs/jbossweb/trunk/src/windows/native/service/jbosssvc/jboss.c Log: Aleays remove the trailing backslash from the working path Modified: labs/jbossweb/trunk/src/windows/native/service/jbosssvc/jboss.c =================================================================== --- labs/jbossweb/trunk/src/windows/native/service/jbosssvc/jboss.c 2006-05-29 17:01:04 UTC (rev 4469) +++ labs/jbossweb/trunk/src/windows/native/service/jbosssvc/jboss.c 2006-05-29 17:27:56 UTC (rev 4470) @@ -782,8 +782,13 @@ if ((argc - i) < args_left) ErrorUsage(); lstrcpy(_service_name, argv[i++]); - if (need_path) + if (need_path) { + int l = lstrlen(argv[i]); lstrcpy(_working_path, argv[i++]); + /* Remove trailing backslash */ + if (_working_path[l - 1] == '\\') + _working_path[l - 1] == '\0' + } if (need_disp) lstrcpy(_service_disp, argv[i++]); if (need_desc) |
From: <jbo...@li...> - 2006-05-29 17:02:55
|
Author: jfr...@jb... Date: 2006-05-29 13:02:49 -0400 (Mon, 29 May 2006) New Revision: 4468 Modified: labs/jbossweb/trunk/src/share/classes/org/apache/catalina/servlets/php/Handler.java Log: Allow to run without the Listener (for the demo for example). Modified: labs/jbossweb/trunk/src/share/classes/org/apache/catalina/servlets/php/Handler.java =================================================================== --- labs/jbossweb/trunk/src/share/classes/org/apache/catalina/servlets/php/Handler.java 2006-05-29 17:01:28 UTC (rev 4467) +++ labs/jbossweb/trunk/src/share/classes/org/apache/catalina/servlets/php/Handler.java 2006-05-29 17:02:49 UTC (rev 4468) @@ -98,6 +98,15 @@ { super.init(servletConfig); + if (!Library.isInitialized()) { + // try to load the library. + try { + Library.initialize(null); + } catch(Exception e) { + e.printStackTrace(); + } + } + if (!Library.isInitialized()) throw new UnavailableException (sm.getString("handler.missing")); |
From: <jbo...@li...> - 2006-05-29 17:01:34
|
Author: jfr...@jb... Date: 2006-05-29 13:01:28 -0400 (Mon, 29 May 2006) New Revision: 4467 Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh Log: Add the package in a compressed tarball. Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-29 16:53:58 UTC (rev 4466) +++ labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-29 17:01:28 UTC (rev 4467) @@ -482,3 +482,25 @@ ld -G -o libphp5servlet.so php5servlet.o -L $TOOLS/PHP/lib -lphp5 ) cp ../php5servlet/libphp5servlet.so $TOOLS/PHP/lib + +# +# At that point everything is build. +# Copy the libraries to php/lib +cp -p $TOOLS/POSTGRESQL/lib/libpq.so* $TOOLS/PHP/lib +cp -p $TOOLS/SSL/lib/libcrypto.so* $TOOLS/PHP/lib +cp -p $TOOLS/SSL/lib/libssl.so* $TOOLS/PHP/lib +cp -p $TOOLS/LPNG/lib/libpng12.so* $TOOLS/PHP/lib +cp -p $TOOLS/LIBXML2/lib/libxml2.so* $TOOLS/PHP/lib + +# +# Build the war file with the demo +ant +mkdir -p $TOOLS/webapps +cp -p php-examples.war $TOOLS/webapps + +# +# Build a tarball with the all stuff +(cd $TOOLS/ + tar zcvf php5servlet.tar.gz PHP/lib webapps +) + |
From: <jbo...@li...> - 2006-05-29 16:54:07
|
Author: jfr...@jb... Date: 2006-05-29 12:53:58 -0400 (Mon, 29 May 2006) New Revision: 4466 Modified: labs/jbossweb/trunk/xdocs/modules/php/index.xml Log: Arrange the doc... setenv.sh description was missing. Modified: labs/jbossweb/trunk/xdocs/modules/php/index.xml =================================================================== --- labs/jbossweb/trunk/xdocs/modules/php/index.xml 2006-05-29 16:00:06 UTC (rev 4465) +++ labs/jbossweb/trunk/xdocs/modules/php/index.xml 2006-05-29 16:53:58 UTC (rev 4466) @@ -31,8 +31,8 @@ </section> <section name="Installing"> -After extracting the tarball corresponding to you platform do the following: -Edit in the <Server/> of <code>$CATALINA_BASE/conf/server.xml</code> and add the following: +After extracting the tarball corresponding to you platform in $CATALINA_BASE do the following: +Edit in the <Server/> of <code>$CATALINA_BASE/conf/server.xml</code> and add a Listener following: <source> <Listener className="org.apache.catalina.servlets.php.LifecycleListener"/> </source> @@ -61,11 +61,22 @@ <url-pattern>*.phps</url-pattern> </servlet-mapping> </source> -The war file of the tarball contains some php demos script they are deployed under /php-examples -Try <code>http://localhost:8080/php-examples/index.php</code> to test them -<todo>Work in progress</todo> +Edit the <code>$CATALINA_BASE/bin/setenv.sh</code> add the <code>LD_LIBRARY_PATH</code> variable and modify/add +the java.library.path parameter of the JVM: +<source> +CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=$CATALINA_HOME/PHP/lib" +LD_LIBRARY_PATH=$CATALINA_HOME/PHP/lib +export LD_LIBRARY_PATH +</source> </section> -<section name="Additing extension libraies"> +<section name="Using the php demo scripts"> +The <code>php-examples.war</code> warfile of the tarball contains some php demo scripts. +They are deployed under /php-examples to use them you only need to modify the <code>$CATALINA_BASE/bin/setenv.sh</code> as described above. You don't have to modify the <code>$CATALINA_BASE/conf/web.xml</code> +nor the <code>$CATALINA_BASE/conf/server.xml</code> files. +You have to start and restart the servlet container because of the environment modifications. +To use the examples, try <code>http://localhost:8080/php-examples/index.php</code>. +</section> +<section name="Additing extension libraries"> For the moment this feature is only supported on Solaris. Edit the <code>php.ini</code> file and add your library extensions as in the following example: <source> @@ -74,7 +85,6 @@ extension=pdo_pgsql.so extension=pgsql.so </source> -<todo>Work in progress</todo> </section> </body> </document> |
From: <jbo...@li...> - 2006-05-29 16:00:15
|
Author: jfr...@jb... Date: 2006-05-29 12:00:06 -0400 (Mon, 29 May 2006) New Revision: 4465 Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh Log: Improve the logic. Specialy for the default cases. Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-29 15:20:45 UTC (rev 4464) +++ labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-29 16:00:06 UTC (rev 4465) @@ -129,26 +129,23 @@ dev12) BUILDXML2=true BUILDPSQL=true + BUILDLPNG=true + BUILDJPEG=true CC=cc export CC # -with-libxml-dir=/usr/local but 2.6.11 needed. # Solaris dynamic ld exports the symbols so build shared extensions. EXTTYPE=shared ADDCONF="\ - --with-libxml-dir=$TOOLS/LIBXML2 \ --with-libexpat-dir=/usr/local \ --with-curl=no \ --with-zlib-dir \ - --with-jpeg-dir=/usr/sfw \ - --with-png-dir=/usr/sfw \ --with-freetype-dir=/usr/sfw \ --with-t1lib=no \ --with-imap=no \ --with-mysql=no \ --with-mysqli=no \ --with-pdo-mysql=no \ - --with-pgsql=$EXTTYPE,$TOOLS/POSTGRESQL \ - --with-pdo-pgsql=$EXTTYPE,$TOOLS/POSTGRESQL \ --with-pspell=no \ --with-readline=no \ --with-tidy=no \ @@ -162,18 +159,15 @@ ;; dev17*) EXTTYPE=static + BUILDPSQL=true ADDCONF="\ --with-pic \ --with-libdir=lib64 \ - --with-jpeg-dir \ - --with-png-dir \ --with-freetype-dir \ \ --with-xpm-dir=no \ --with-t1lib=no \ --with-imap=no \ - --with-pgsql=no \ - --with-pdo-pgsql=no \ --with-pspell=no \ --with-tidy=no \ --with-curl \ @@ -187,20 +181,9 @@ dev03*) EXTTYPE=static ADDCONF="\ - --with-jpeg-dir \ - --with-png-dir \ --with-freetype-dir \ --with-t1lib=no \ \ - --disable-libxml \ - --disable-dom \ - --disable-simplexml \ - --disable-soap \ - --disable-wddx \ - --disable-xmlreader \ - --disable-xmlwriter \ - --disable-xml \ - --with-xmlrpc=no \ --without-pear \ \ --with-bz2=no \ @@ -217,8 +200,6 @@ dev18*) EXTTYPE=static ADDCONF="\ - --with-jpeg-dir \ - --with-png-dir \ --with-freetype-dir \ --with-t1lib \ \ @@ -244,18 +225,11 @@ COMPILER=solaris-x86-cc ADDCONF="\ --with-iconv-dir=/usr/local \ - --with-libxml-dir=$TOOLS/LIBXML2 \ - --with-jpeg-dir=$TOOLS/JPEG \ - --with-png-dir=$TOOLS/LPNG \ --with-freetype-dir=/usr/sfw \ --with-t1lib \ \ --with-xpm-dir=no \ --with-t1lib=no \ - --with-pgsql=$EXTTYPE,$TOOLS/POSTGRESQL \ - --with-pdo-pgsql=$EXTTYPE,$TOOLS/POSTGRESQL \ - --with-openssl=shared,$TOOLS/SSL \ - --with-openssl-dir=$TOOLS/SSL \ --with-curl=no \ --with-imap=no \ --with-pspell=no \ @@ -263,9 +237,12 @@ ADDFLAGS="-I $JAVA_HOME/include/solaris" ;; *) + BUILDXML2=true + BUILDPSQL=true + BUILDOSSL=true + BUILDLPNG=true + BUILDJPEG=true ADDCONF="\ - --with-jpeg-dir \ - --with-png-dir \ --with-freetype-dir \ --with-t1lib=no \ --with-xpm-dir \ @@ -286,11 +263,19 @@ esac # -# build lib png if required +# build lib jpeg if required if ${BUILDJPEG} then + # Directory are not created by jpeg installation... + mkdir -p ${TOOLS}/JPEG/include + mkdir -p ${TOOLS}/JPEG/lib + mkdir -p ${TOOLS}/JPEG/bin + mkdir -p ${TOOLS}/JPEG/man/man1 Extract jpeg ${JPEGURL} ${JPEGVER} Build jpeg-${JPEGVER} ${TOOLS}/JPEG "--enable-shared" + ADDCONF="$ADDCONF --with-jpeg-dir=$TOOLS/JPEG" +else + ADDCONF="$ADDCONF --with-jpeg-dir" fi # @@ -299,15 +284,20 @@ then Extract libpng ${LPNGURL} ${LPNGVER} Build libpng-${LPNGVER} ${TOOLS}/LPNG "" + ADDCONF="$ADDCONF --with-png-dir=$TOOLS/LPNG" +else + ADDCONF="$ADDCONF --with-png-dir" fi - # # build libxml2 if required if ${BUILDXML2} then Extract libxml2 ${XML2URL} ${XML2VER} Build libxml2-${XML2VER} ${TOOLS}/LIBXML2 "" + ADDCONF="$ADDCONF --with-libxml-dir=$TOOLS/LIBXML2" +else + ADDCONF="$ADDCONF --with-libxml-dir" fi # @@ -322,12 +312,15 @@ then ./Configure --prefix=${TOOLS}/SSL threads no-zlib no-zlib-dynamic no-gmp no-krb5 no-rc5 no-mdc2 no-idea no-ec shared $COMPILER -I/opt/SUNWspro/prod/include/CC/Cstd/rw -I/opt/SUNWspro/prod/include/CC/Cstd else - ./Configure --prefix=${TOOLS}/SSL threads no-zlib no-zlib-dynamic no-gmp no-krb5 no-rc5 no-mdc2 no-idea no-ec shared $COMPILER + ./config --prefix=${TOOLS}/SSL threads no-zlib no-zlib-dynamic no-gmp no-krb5 no-rc5 no-mdc2 no-idea no-ec shared fi make clean make depend make install ) + ADDCONF="$ADDCONF --with-openssl=$TOOLS/SSL --with-openssl-dir=$TOOLS/SSL" +else + ADDCONF="$ADDCONF --with-openssl" fi # @@ -342,6 +335,9 @@ else Build postgresql-${PSQLVER} ${TOOLS}/POSTGRESQL --without-readline fi + ADDCONF="$ADDCONF --with-pgsql=$TOOLS/POSTGRESQL --with-pdo-pgsql=$TOOLS/POSTGRESQL" +else + ADDCONF="$ADDCONF --with-pgsql --with-pdo-pgsql" fi # |
From: <jbo...@li...> - 2006-05-29 15:20:49
|
Author: jfr...@jb... Date: 2006-05-29 11:20:45 -0400 (Mon, 29 May 2006) New Revision: 4464 Modified: labs/jbossweb/trunk/src/share/native/build/build.xml Log: Add the font files and use a better name for context. Modified: labs/jbossweb/trunk/src/share/native/build/build.xml =================================================================== --- labs/jbossweb/trunk/src/share/native/build/build.xml 2006-05-29 15:18:12 UTC (rev 4463) +++ labs/jbossweb/trunk/src/share/native/build/build.xml 2006-05-29 15:20:45 UTC (rev 4464) @@ -1,9 +1,10 @@ <project name="JBoss Web PHP demo" default="build" basedir="."> <target name="build"> - <war destfile="myapp.war" webxml="php.xml"> + <war destfile="php-examples.war" webxml="php.xml"> <fileset dir="../../examples/php"> <include name="**/*.php"/> + <include name="**/*.ttf"/> </fileset> <lib dir="../../../../output/jbossweb-1.0.0.CR1/server/default/deploy/jbossweb.sar"> <include name="**/servlets-php.jar"/> |
From: <jbo...@li...> - 2006-05-29 15:18:31
|
Author: jfr...@jb... Date: 2006-05-29 11:18:12 -0400 (Mon, 29 May 2006) New Revision: 4463 Added: labs/jbossweb/trunk/src/share/examples/php/shlyalln.ttf Log: Oops also missing. Added: labs/jbossweb/trunk/src/share/examples/php/shlyalln.ttf =================================================================== (Binary files differ) Property changes on: labs/jbossweb/trunk/src/share/examples/php/shlyalln.ttf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
From: <jbo...@li...> - 2006-05-29 15:13:54
|
Author: jfr...@jb... Date: 2006-05-29 11:13:48 -0400 (Mon, 29 May 2006) New Revision: 4462 Added: labs/jbossweb/trunk/src/share/examples/php/dauphinn.ttf Log: For the font example. Added: labs/jbossweb/trunk/src/share/examples/php/dauphinn.ttf =================================================================== (Binary files differ) Property changes on: labs/jbossweb/trunk/src/share/examples/php/dauphinn.ttf ___________________________________________________________________ Name: svn:mime-type + application/octet-stream |
From: <jbo...@li...> - 2006-05-29 05:23:29
|
Author: mic...@jb... Date: 2006-05-29 01:23:21 -0400 (Mon, 29 May 2006) New Revision: 4461 Modified: labs/jbossrules/trunk/documentation/training/developers-course/Module 6 - rule formats.odp labs/jbossrules/trunk/documentation/training/developers-course/course_outline.odt Log: corrections Modified: labs/jbossrules/trunk/documentation/training/developers-course/Module 6 - rule formats.odp =================================================================== (Binary files differ) Modified: labs/jbossrules/trunk/documentation/training/developers-course/course_outline.odt =================================================================== (Binary files differ) |