JBoss Tools SVN: r41760 - trunk/jmx/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2012-06-06 19:30:58 -0400 (Wed, 06 Jun 2012)
New Revision: 41760
Modified:
trunk/jmx/docs/reference/en-US/Book_Info.xml
Log:
updated for brew
Modified: trunk/jmx/docs/reference/en-US/Book_Info.xml
===================================================================
--- trunk/jmx/docs/reference/en-US/Book_Info.xml 2012-06-06 23:26:53 UTC (rev 41759)
+++ trunk/jmx/docs/reference/en-US/Book_Info.xml 2012-06-06 23:30:58 UTC (rev 41760)
@@ -5,9 +5,9 @@
<title>JMX Tools Reference Guide</title>
<subtitle>Provides information relating to the JMX Tools module.</subtitle>
<productname>JBoss Developer Studio</productname>
- <productnumber>5.0.Beta</productnumber>
+ <productnumber>5.0</productnumber>
<edition>5.0.0</edition>
- <pubsnumber>2</pubsnumber>
+ <pubsnumber>3</pubsnumber>
<abstract>
<para>The JMX Tools Reference Guide explains how to use the JMX Tools module to setup multiple JMX connections and explore the JMX tree and execute operations.</para>
</abstract>
13 years, 4 months
JBoss Tools SVN: r41759 - trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-06-06 19:26:53 -0400 (Wed, 06 Jun 2012)
New Revision: 41759
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/CommonValidationPlugin.java
Log:
https://issues.jboss.org/browse/JBIDE-10738 As-you-type EL validation
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/CommonValidationPlugin.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/CommonValidationPlugin.java 2012-06-06 23:24:02 UTC (rev 41758)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/CommonValidationPlugin.java 2012-06-06 23:26:53 UTC (rev 41759)
@@ -65,7 +65,11 @@
}
return updated;
}
-
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
13 years, 4 months
JBoss Tools SVN: r41758 - in trunk/common/plugins/org.jboss.tools.common.validation: src/org/jboss/tools/common/validation and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-06-06 19:24:02 -0400 (Wed, 06 Jun 2012)
New Revision: 41758
Added:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaEditorTracker.java
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/META-INF/MANIFEST.MF
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/CommonValidationPlugin.java
Log:
https://issues.jboss.org/browse/JBIDE-10738 As-you-type EL validation
Modified: trunk/common/plugins/org.jboss.tools.common.validation/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/META-INF/MANIFEST.MF 2012-06-06 23:15:45 UTC (rev 41757)
+++ trunk/common/plugins/org.jboss.tools.common.validation/META-INF/MANIFEST.MF 2012-06-06 23:24:02 UTC (rev 41758)
@@ -18,6 +18,7 @@
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.wst.validation.ui;bundle-version="1.2.204",
org.eclipse.jdt.core;bundle-version="3.7.0",
+ org.eclipse.jdt.ui;bundle-version="3.7.0",
org.eclipse.wst.sse.ui;bundle-version="1.3.0";visibility:=reexport
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/CommonValidationPlugin.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/CommonValidationPlugin.java 2012-06-06 23:15:45 UTC (rev 41757)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/CommonValidationPlugin.java 2012-06-06 23:24:02 UTC (rev 41758)
@@ -15,7 +15,10 @@
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.swt.widgets.Display;
import org.jboss.tools.common.log.BaseUIPlugin;
+import org.jboss.tools.common.validation.java.JavaEditorTracker;
+import org.osgi.framework.BundleContext;
/**
* @author Alexey Kazakov
@@ -62,4 +65,14 @@
}
return updated;
}
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ JavaEditorTracker.getInstance();
+ }
+ });
+ }
}
\ No newline at end of file
Added: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java 2012-06-06 23:24:02 UTC (rev 41758)
@@ -0,0 +1,462 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.validation.java;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.compiler.CategorizedProblem;
+import org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.ProblemAnnotation;
+import org.eclipse.jdt.ui.text.IJavaPartitions;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.BadPartitioningException;
+import org.eclipse.jface.text.DocumentRewriteSessionEvent;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IDocumentExtension3;
+import org.eclipse.jface.text.IDocumentExtension4;
+import org.eclipse.jface.text.IDocumentRewriteSessionListener;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.ITypedRegion;
+import org.eclipse.jface.text.Position;
+import org.eclipse.jface.text.reconciler.DirtyRegion;
+import org.eclipse.jface.text.source.Annotation;
+import org.eclipse.jface.text.source.IAnnotationModel;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.ui.internal.reconcile.DirtyRegionProcessor;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.eclipse.wst.validation.internal.provisional.core.IValidationContext;
+import org.eclipse.wst.validation.internal.provisional.core.IValidator;
+import org.jboss.tools.common.EclipseUtil;
+import org.jboss.tools.common.log.LogHelper;
+import org.jboss.tools.common.validation.AsYouTypeValidatorManager;
+import org.jboss.tools.common.validation.CommonValidationPlugin;
+import org.jboss.tools.common.validation.ValidationMessage;
+
+/**
+ * As-You-Type validation for EL in Java Strings
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
+@SuppressWarnings("restriction")
+final class JavaDirtyRegionProcessor extends
+ DirtyRegionProcessor {
+ private ITextEditor fEditor;
+ private IDocument fDocument;
+ private IValidationContext fHelper;
+ private JavaELProblemReporter fReporter;
+ private AsYouTypeValidatorManager fValidatorManager;
+
+ private boolean fIsCanceled = false;
+ private boolean fInRewriteSession = false;
+ private IDocumentRewriteSessionListener fDocumentRewriteSessionListener = new DocumentRewriteSessionListener();
+
+ public final class JavaELProblemReporter implements IReporter {
+ public static final String MARKER_TYPE= "org.jboss.tools.common.validation.el"; //$NON-NLS-1$
+ private IFile fFile;
+ private ICompilationUnit fCompilationUnit;
+ private IAnnotationModel fAnnotationModel;
+ private boolean fIsCanceled = false;
+
+ @Override
+ public void removeMessageSubset(IValidator validator, Object obj,
+ String groupName) {
+ // Does nothing
+ }
+
+ @Override
+ public void removeAllMessages(IValidator origin, Object object) {
+ // Does nothing
+ }
+
+ @Override
+ public void removeAllMessages(IValidator origin) {
+ // Does nothing
+ }
+
+ public void setCanceled(boolean set) {
+ this.fIsCanceled = set;
+ }
+
+ @Override
+ public boolean isCancelled() {
+ return this.fIsCanceled;
+ }
+
+ @SuppressWarnings("rawtypes")
+ @Override
+ public List getMessages() {
+ return null;
+ }
+
+ @Override
+ public void displaySubtask(IValidator validator, IMessage message) {
+ // Does nothing
+ }
+
+ Map<Annotation, Position> fAnnotations = new HashMap<Annotation, Position>();
+
+ public void update() {
+ getAnnotationModel();
+ fFile = (fEditor != null && fEditor.getEditorInput() instanceof IFileEditorInput ? ((IFileEditorInput)fEditor.getEditorInput()).getFile() : null);
+ fCompilationUnit = EclipseUtil.getCompilationUnit(fFile);
+ }
+
+ protected IAnnotationModel getAnnotationModel() {
+ final IDocumentProvider documentProvider= fEditor.getDocumentProvider();
+ if (documentProvider == null)
+ return null;
+ IAnnotationModel newModel = documentProvider.getAnnotationModel(fEditor.getEditorInput());
+ if (fAnnotationModel != newModel) {
+ clearAllAnnotations();
+ fAnnotationModel = newModel;
+ }
+ return fAnnotationModel;
+ }
+
+ private void clearAllAnnotations() {
+ if (fAnnotations.isEmpty())
+ return;
+ Annotation[] annotations = fAnnotations.keySet().toArray(new Annotation[0]);
+ for (Annotation annotation : annotations) {
+ fAnnotations.remove(annotation);
+ fAnnotationModel.removeAnnotation(annotation);
+ }
+ }
+
+ public void clearAnnotations(int start, int end) {
+ if (fAnnotations.isEmpty())
+ return;
+ Annotation[] annotations = fAnnotations.keySet().toArray(new Annotation[0]);
+ for (Annotation annotation : annotations) {
+ Position position = fAnnotations.get(annotation);
+ if (position.getOffset() >= start &&
+ position.getOffset() < end) {
+ // remove annotation from managed annotations map as well as from the model
+ fAnnotations.remove(annotation);
+ getAnnotationModel().removeAnnotation(annotation);
+ }
+ }
+ }
+
+ public void addAnnotation(Annotation annotation, Position position) {
+ if (isCancelled())
+ return;
+
+ fAnnotations.put(annotation, position);
+ getAnnotationModel().addAnnotation(annotation, position);
+ }
+
+ @Override
+ public void addMessage(IValidator origin, IMessage message) {
+ if (isCancelled())
+ return;
+ if (message instanceof ValidationMessage && getAnnotationModel() != null) {
+ ValidationMessage valMessage = (ValidationMessage)message;
+
+ IEditorInput editorInput= fEditor.getEditorInput();
+ if (editorInput != null) {
+ Position position = new Position(valMessage.getOffset(), valMessage.getLength());
+ CoreELProblem problem= new CoreELProblem(valMessage,
+ editorInput.getName());
+ fCompilationUnit = EclipseUtil.getCompilationUnit(fFile);
+ if (fCompilationUnit != null) {
+ ProblemAnnotation problemAnnotation = new ProblemAnnotation(problem, fCompilationUnit);
+ addAnnotation(problemAnnotation, position);
+ }
+ }
+ }
+ }
+ }
+
+ class DocumentRewriteSessionListener implements IDocumentRewriteSessionListener {
+ public void documentRewriteSessionChanged(DocumentRewriteSessionEvent event) {
+ fInRewriteSession = event != null && event.getChangeType().equals(DocumentRewriteSessionEvent.SESSION_START);
+ }
+ }
+
+ class CoreELProblem extends CategorizedProblem {
+
+ // spelling 'marker type' name. Only virtual as spelling problems are never persisted in markers.
+ // marker type is used in the quickFixProcessor extension point
+ public static final String MARKER_TYPE= "org.jboss.tools.common.validation.el"; //$NON-NLS-1$
+
+ /** The end offset of the problem */
+ private int fSourceEnd= 0;
+
+ /** The line number of the problem */
+ private int fLineNumber= 1;
+
+ /** The start offset of the problem */
+ private int fSourceStart= 0;
+
+ /** The description of the problem */
+ private String fMessage;
+
+ private boolean fIsError;
+
+ /** The originating file name */
+ private String fOrigin;
+
+ public static final int EL_PROBLEM_ID= 0x88000000;
+
+ /**
+ * Initialize with the given parameters.
+ *
+ * @param message ValidationMessage
+ * @param document the document
+ * @param origin the originating file name
+ */
+ public CoreELProblem(ValidationMessage message, String origin) {
+ super();
+ fSourceStart= message.getOffset();
+ fSourceEnd= message.getOffset() + message.getLength() - 1;
+ fLineNumber= message.getLineNumber();
+ fMessage= message.getText();
+ fOrigin= origin;
+ fIsError = (IMessage.NORMAL_SEVERITY != message.getSeverity());
+ }
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#getArguments()
+ */
+ public String[] getArguments() {
+ return new String[0];
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#getID()
+ */
+ public int getID() {
+ return EL_PROBLEM_ID;
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#getMessage()
+ */
+ public String getMessage() {
+ return fMessage;
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#getOriginatingFileName()
+ */
+ public char[] getOriginatingFileName() {
+ return fOrigin.toCharArray();
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#getSourceEnd()
+ */
+ public int getSourceEnd() {
+ return fSourceEnd;
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#getSourceLineNumber()
+ */
+ public int getSourceLineNumber() {
+ return fLineNumber;
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#getSourceStart()
+ */
+ public int getSourceStart() {
+ return fSourceStart;
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#isError()
+ */
+ public boolean isError() {
+ return fIsError;
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#isWarning()
+ */
+ public boolean isWarning() {
+ return !fIsError;
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#setSourceStart(int)
+ */
+ public void setSourceStart(int sourceStart) {
+ fSourceStart= sourceStart;
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#setSourceEnd(int)
+ */
+ public void setSourceEnd(int sourceEnd) {
+ fSourceEnd= sourceEnd;
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.IProblem#setSourceLineNumber(int)
+ */
+ public void setSourceLineNumber(int lineNumber) {
+ fLineNumber= lineNumber;
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.CategorizedProblem#getCategoryID()
+ */
+ @Override
+ public int getCategoryID() {
+ return CAT_SYNTAX;
+ }
+
+ /*
+ * @see org.eclipse.jdt.core.compiler.CategorizedProblem#getMarkerType()
+ */
+ @Override
+ public String getMarkerType() {
+ return MARKER_TYPE;
+ }
+ }
+
+ public JavaDirtyRegionProcessor(ITextEditor editor) {
+ this.fEditor = editor;
+ fHelper = createValidationContext();
+ fReporter = createProblemReporter();
+ }
+
+ private IValidationContext createValidationContext() {
+ return new IValidationContext() {
+
+ @Override
+ public Object loadModel(String arg0, Object[] arg1) {
+ return null;
+ }
+
+ @Override
+ public Object loadModel(String arg0) {
+ return null;
+ }
+
+ @Override
+ public String[] getURIs() {
+ IFile file = (fEditor != null && fEditor.getEditorInput() instanceof IFileEditorInput ? ((IFileEditorInput)fEditor.getEditorInput()).getFile() : null);
+ String URI = file == null ? null : file.getFullPath().toPortableString();
+ return URI == null ? new String[0] : new String[] {URI};
+ }
+ };
+ }
+
+ private JavaELProblemReporter createProblemReporter() {
+ JavaELProblemReporter reporter = new JavaELProblemReporter();
+ reporter.update();
+ return reporter;
+ }
+
+ @Override
+ public synchronized void startReconciling() {
+ super.startReconciling();
+ }
+
+ private boolean isInRewrite() {
+ return fInRewriteSession;
+ }
+
+ @Override
+ public void setDocument(IDocument doc) {
+ if (fDocument != null) {
+ if (fDocument instanceof IDocumentExtension4) {
+ ((IDocumentExtension4) fDocument).removeDocumentRewriteSessionListener(fDocumentRewriteSessionListener);
+ }
+ if (fValidatorManager != null && fDocument != null) {
+ fValidatorManager.disconnect(fDocument);
+ }
+ }
+
+ fDocument = doc;
+ super.setDocument(doc);
+
+ if (fDocument != null) {
+ if (fDocument instanceof IDocumentExtension4) {
+ ((IDocumentExtension4) fDocument).addDocumentRewriteSessionListener(fDocumentRewriteSessionListener);
+ }
+ if (fValidatorManager == null)
+ fValidatorManager = new AsYouTypeValidatorManager();
+
+ fValidatorManager.connect(fDocument);
+
+ if (fReporter != null) {
+ fReporter.update();
+ }
+ }
+ }
+
+ @Override
+ public void install(ITextViewer textViewer) {
+ super.install(textViewer);
+ }
+
+ @Override
+ public void uninstall() {
+ fIsCanceled = true;
+ if(fReporter != null)
+ fReporter.setCanceled(true);
+
+ super.uninstall();
+ }
+
+ protected void process(DirtyRegion dirtyRegion) {
+ if (!isInstalled() || isInRewrite() || dirtyRegion == null || getDocument() == null || fIsCanceled) {
+ return;
+ }
+ /*
+ * Expand dirtyRegion to partitions boundaries
+ */
+ int start = dirtyRegion.getOffset();
+ int end = dirtyRegion.getOffset() + dirtyRegion.getLength();
+
+ try {
+ ITypedRegion startPartition = (fDocument instanceof IDocumentExtension3) ?
+ ((IDocumentExtension3)fDocument).getPartition(IJavaPartitions.JAVA_PARTITIONING, start, true) :
+ fDocument.getPartition(start);
+ if (startPartition != null && start > startPartition.getOffset())
+ start = startPartition.getOffset();
+
+ ITypedRegion endPartition = (fDocument instanceof IDocumentExtension3) ?
+ ((IDocumentExtension3)fDocument).getPartition(IJavaPartitions.JAVA_PARTITIONING, end, false) :
+ fDocument.getPartition(end);
+ if (endPartition != null && end < endPartition.getOffset() + endPartition.getLength())
+ end = endPartition.getOffset() + endPartition.getLength();
+
+ } catch (BadLocationException e) {
+ LogHelper.logError(CommonValidationPlugin.getDefault(), e);
+ } catch (BadPartitioningException e) {
+ LogHelper.logError(CommonValidationPlugin.getDefault(), e);
+ }
+
+ ITypedRegion[] partitions = computePartitioning(start, end - start);
+
+ if (fReporter != null) {
+ fReporter.clearAnnotations(start, end);
+ }
+ for (int i = 0; i < partitions.length; i++) {
+ if (partitions[i] != null && !fIsCanceled && IJavaPartitions.JAVA_STRING.equals(partitions[i].getType())) {
+ if (fValidatorManager != null)
+ fValidatorManager.validate(partitions[i], fHelper, fReporter);
+ }
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaDirtyRegionProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaEditorTracker.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaEditorTracker.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaEditorTracker.java 2012-06-06 23:24:02 UTC (rev 41758)
@@ -0,0 +1,180 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.validation.java;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer;
+import org.eclipse.jdt.ui.text.IJavaPartitions;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IPageListener;
+import org.eclipse.ui.IPartListener;
+import org.eclipse.ui.IWindowListener;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.jboss.tools.common.validation.CommonValidationPlugin;
+
+/**
+ * Installer for As-You-Type validation for EL in Java Strings
+ *
+ * @author Victor V. Rubezhny
+ *
+ */
+@SuppressWarnings("restriction")
+public class JavaEditorTracker implements IWindowListener, IPageListener, IPartListener {
+ static JavaEditorTracker INSTANCE;
+
+ Map<JavaEditor, JavaDirtyRegionProcessor> fAsYouTypeValidators = new HashMap<JavaEditor, JavaDirtyRegionProcessor>();
+
+ private JavaEditorTracker() {
+ init();
+ }
+
+ public static JavaEditorTracker getInstance() {
+ if(INSTANCE == null) {
+ INSTANCE = new JavaEditorTracker();
+ }
+ return INSTANCE;
+ }
+
+ private void init() {
+ IWorkbench workbench = CommonValidationPlugin.getDefault().getWorkbench();
+ if(workbench != null) {
+ IWorkbenchWindow[] windows = workbench.getWorkbenchWindows();
+ for (IWorkbenchWindow window: windows) {
+ windowOpened(window);
+ }
+ CommonValidationPlugin.getDefault().getWorkbench().addWindowListener(this);
+ }
+ }
+
+ @Override
+ public void windowActivated(IWorkbenchWindow window) {
+ }
+
+ @Override
+ public void windowDeactivated(IWorkbenchWindow window) {
+ }
+
+ @Override
+ public void windowClosed(IWorkbenchWindow window) {
+ IWorkbenchPage[] pages = window.getPages();
+ for (IWorkbenchPage page: pages) {
+ pageClosed(page);
+ }
+ window.removePageListener(this);
+ }
+
+ @Override
+ public void windowOpened(IWorkbenchWindow window) {
+ if(window.getShell() != null) {
+ IWorkbenchPage[] pages = window.getPages();
+ for (IWorkbenchPage page: pages) {
+ pageOpened(page);
+ }
+ window.addPageListener(this);
+ }
+ }
+
+ @Override
+ public void pageActivated(IWorkbenchPage page) {
+ }
+
+ @Override
+ public void pageClosed(IWorkbenchPage page) {
+ IEditorReference[] rs = page.getEditorReferences();
+ for (IEditorReference r: rs) {
+ IEditorPart part = r.getEditor(false);
+ if(part != null) {
+ editorClosed(part);
+ }
+ }
+ page.removePartListener(this);
+ }
+
+ @Override
+ public void pageOpened(IWorkbenchPage page) {
+ IEditorReference[] rs = page.getEditorReferences();
+ for (IEditorReference r: rs) {
+ IEditorPart part = r.getEditor(false);
+ if(part != null) {
+ editorOpened(part);
+ }
+ }
+ page.addPartListener(this);
+ }
+
+ @Override
+ public void partActivated(IWorkbenchPart part) {
+ }
+
+ @Override
+ public void partBroughtToTop(IWorkbenchPart part) {
+ }
+
+ @Override
+ public void partClosed(IWorkbenchPart part) {
+ if (part instanceof IEditorPart) {
+ editorClosed((IEditorPart)part);
+ }
+ }
+
+ @Override
+ public void partDeactivated(IWorkbenchPart part) {
+ }
+
+ @Override
+ public void partOpened(IWorkbenchPart part) {
+ if (part instanceof IEditorPart) {
+ editorOpened((IEditorPart)part);
+ }
+ }
+
+ private void editorOpened(IEditorPart part) {
+ if (part instanceof JavaEditor) {
+ JavaEditor javaEditor = (JavaEditor)part;
+ JavaSourceViewer javaSourceViewer = (JavaSourceViewer)javaEditor.getViewer();
+
+ JavaDirtyRegionProcessor processor = fAsYouTypeValidators.get(javaEditor);
+ if (processor != null) {
+ // Emulate editor closed due to uninstall the old processor
+ editorClosed(part);
+ Assert.isTrue(null == fAsYouTypeValidators.get(javaEditor), "An old JavaDirtyRegionProcessor is not un-installed on Java Editor instance");
+ }
+
+ processor = new JavaDirtyRegionProcessor(javaEditor);
+ processor.install(javaSourceViewer);
+ processor.setDocument(javaSourceViewer.getDocument());
+ processor.setDocumentPartitioning(IJavaPartitions.JAVA_PARTITIONING);
+ processor.startReconciling();
+ fAsYouTypeValidators.put(javaEditor, processor);
+ }
+ }
+
+ private void editorClosed(IEditorPart part) {
+ if (part instanceof JavaEditor) {
+ JavaEditor javaEditor = (JavaEditor)part;
+
+ JavaDirtyRegionProcessor processor = fAsYouTypeValidators.remove(javaEditor);
+ if (processor != null) {
+ processor.uninstall();
+ Assert.isTrue(null == fAsYouTypeValidators.get(javaEditor), "An old JavaDirtyRegionProcessor is not un-installed on Java Editor instance");
+ }
+ }
+ }
+}
+
Property changes on: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/java/JavaEditorTracker.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 4 months
JBoss Tools SVN: r41757 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-06-06 19:15:45 -0400 (Wed, 06 Jun 2012)
New Revision: 41757
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
Log:
https://issues.jboss.org/browse/JBIDE-10738 As-you-type EL validation
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2012-06-06 20:22:00 UTC (rev 41756)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageContextFactory.java 2012-06-06 23:15:45 UTC (rev 41757)
@@ -285,11 +285,16 @@
}
}
- private ELContext createPropertiesContext(IFile file) {
+ private ELContext createPropertiesContext(IFile file, IDocument document, boolean useLastSavedStateOfFile) {
ELContextImpl context = new ELContextImpl();
context.setResource(file);
context.setElResolvers(ELResolverFactoryManager.getInstance().getResolvers(file));
- String content = FileUtil.getContentFromEditorOrFile(file);
+ String content = null;
+ if(document==null || useLastSavedStateOfFile) {
+ content = FileUtil.getContentFromEditorOrFile(file);
+ } else {
+ content = document.get();
+ }
if(content.indexOf('{')>-1 && content.indexOf(EL_START_1) >-1 || content.indexOf(EL_START_2)>-1 ) {
ELReference elReference = new ValidationELReference();
elReference.setResource(file);
@@ -297,18 +302,19 @@
elReference.setStartPosition(0);
elReference.init(content);
context.addELReference(elReference);
-
}
return context;
}
- private static ELContext createJavaContext(IFile file) {
+ private static ELContext createJavaContext(IFile file, IDocument document, boolean useLastSavedStateOfFile) {
ELContextImpl context = new ELContextImpl();
context.setResource(file);
context.setElResolvers(ELResolverFactoryManager.getInstance().getResolvers(file));
- String content = FileUtil.getContentFromEditorOrFile(file);
FastJavaPartitionScanner scaner = new FastJavaPartitionScanner();
- Document document = new Document(content);
+ if(document==null || useLastSavedStateOfFile) {
+ String content = FileUtil.getContentFromEditorOrFile(file);
+ document = new Document(content);
+ }
scaner.setRange(document, 0, document.getLength());
IToken token = scaner.nextToken();
while(token!=null && token!=Token.EOF) {
@@ -371,9 +377,9 @@
String typeId = getContentTypeIdentifier(file == null ? document : file);
if(JavaCore.JAVA_SOURCE_CONTENT_TYPE.equalsIgnoreCase(typeId)) {
- context = createJavaContext(file);
+ context = createJavaContext(file, document, !dontUseCache);
} else if(JAVA_PROPERTIES_CONTENT_TYPE.equalsIgnoreCase(typeId)) {
- context = createPropertiesContext(file);
+ context = createPropertiesContext(file, document, !dontUseCache);
} else if(file != null && isXMLWithoutEL(file)) {
IProject project = file != null ? file.getProject() : getActiveProject();
context = new SimpleELContext();
@@ -405,7 +411,7 @@
IProject project = file != null ? file.getProject() : getActiveProject();
context.setElResolvers(ELResolverFactoryManager.getInstance().getResolvers(project));
- if (context instanceof JspContextImpl && !(context instanceof FaceletPageContextImpl)) {
+ if (document!=null && context instanceof JspContextImpl && !(context instanceof FaceletPageContextImpl)) {
// Fill JSP namespaces defined in TLDCMDocumentManager
fillJSPNameSpaces((JspContextImpl)context, document);
}
13 years, 4 months
JBoss Tools SVN: r41756 - branches/jbosstools-3.3.x/build/publish.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-06-06 16:22:00 -0400 (Wed, 06 Jun 2012)
New Revision: 41756
Modified:
branches/jbosstools-3.3.x/build/publish/publish.sh
Log:
remove debugging stuff; this finally works because the job points at build/publish/publish.sh instead of obsolete build/publish.sh (I wish people wouldn't move stuff and then do an incomplete job of updating all the linkages)
Modified: branches/jbosstools-3.3.x/build/publish/publish.sh
===================================================================
--- branches/jbosstools-3.3.x/build/publish/publish.sh 2012-06-06 19:47:52 UTC (rev 41755)
+++ branches/jbosstools-3.3.x/build/publish/publish.sh 2012-06-06 20:22:00 UTC (rev 41756)
@@ -169,7 +169,6 @@
foundSourcesZip=0
# for now, but the JBDS sources into the /installer/ folder
-date; ls -l ${WORKSPACE}/sources/product/sources/target
for z in $(find ${WORKSPACE}/sources/product/sources/target -type f -name "jbdevstudio-product-sources-*.zip"); do
for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
mkdir -p ${STAGINGDIR}/installer/
@@ -191,7 +190,6 @@
popd
z=${STAGINGDIR}/all/${srczipname}; for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
fi
-date
mkdir -p ${STAGINGDIR}/logs
13 years, 4 months
JBoss Tools SVN: r41755 - in trunk: maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-06-06 15:47:52 -0400 (Wed, 06 Jun 2012)
New Revision: 41755
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard2.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardFirstPage.java
Log:
JBDS-2198 - Projects created via JBoss Central page are not added to working sets
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java 2012-06-06 17:50:57 UTC (rev 41754)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesJob.java 2012-06-06 19:47:52 UTC (rev 41755)
@@ -24,6 +24,7 @@
public class NewProjectExamplesJob extends WorkspaceJob {
+ private static final String WORKING_SETS = "workingSets"; //$NON-NLS-1$
private List<ProjectExample> selectedProjects;
private List<ProjectExample> projects = new ArrayList<ProjectExample>();
private IWorkingSet[] workingSets;
@@ -71,6 +72,15 @@
} else {
return Status.CANCEL_STATUS;
}
+ if (workingSets == null || workingSets.length == 0) {
+ if (propertiesMap != null) {
+ Object object = propertiesMap.get(WORKING_SETS);
+ if (object instanceof List<?>) {
+ List<IWorkingSet> list = (List<IWorkingSet>) object;
+ workingSets = list.toArray(new IWorkingSet[0]);
+ }
+ }
+ }
if (workingSets != null && workingSets.length > 0 && project.getIncludedProjects() != null) {
for (String projectName:project.getIncludedProjects()) {
IProject eclipseProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard2.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard2.java 2012-06-06 17:50:57 UTC (rev 41754)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/wizard/NewProjectExamplesWizard2.java 2012-06-06 19:47:52 UTC (rev 41755)
@@ -108,7 +108,7 @@
if (!ProjectExamplesActivator.MAVEN_ARCHETYPE.equals(projectExample.getImportType())) {
workingSets = locationPage.getWorkingSets();
} else {
- // FIXME
+ //
}
String type = projectExample.getImportType();
for (IProjectExamplesWizardPage contributedPage:contributedPages) {
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardFirstPage.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardFirstPage.java 2012-06-06 17:50:57 UTC (rev 41754)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardFirstPage.java 2012-06-06 19:47:52 UTC (rev 41755)
@@ -14,6 +14,7 @@
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -74,6 +75,7 @@
*/
public class ArchetypeExamplesWizardFirstPage extends MavenProjectWizardLocationPage implements IProjectExamplesWizardPage {
+ private static final String WORKING_SETS = "workingSets"; //$NON-NLS-1$
private static final String TARGET_RUNTIME = "targetRuntime"; //$NON-NLS-1$
private Label projectNameLabel;
private Combo projectNameCombo;
@@ -546,6 +548,18 @@
@Override
public Map<String, Object> getPropertiesMap() {
+ try {
+ Field field = this.getClass().getSuperclass().getDeclaredField(WORKING_SETS);
+ field.setAccessible(true);
+ Object object = field.get(this);
+ if (object instanceof List<?>) {
+ Map<String, Object> propertiesMap = new HashMap<String, Object>();
+ propertiesMap.put(WORKING_SETS, object);
+ return propertiesMap;
+ }
+ } catch (Exception e) {
+ MavenProjectExamplesActivator.log(e);
+ }
return null;
}
13 years, 4 months
JBoss Tools SVN: r41754 - trunk/documentation/whatsnew/as/images.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-06-06 13:50:57 -0400 (Wed, 06 Jun 2012)
New Revision: 41754
Added:
trunk/documentation/whatsnew/as/images/11059.png
trunk/documentation/whatsnew/as/images/11587.png
trunk/documentation/whatsnew/as/images/11820.png
trunk/documentation/whatsnew/as/images/9239.png
Log:
forgot images
Added: trunk/documentation/whatsnew/as/images/11059.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/as/images/11059.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/as/images/11587.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/as/images/11587.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/as/images/11820.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/as/images/11820.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/as/images/9239.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/as/images/9239.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
13 years, 4 months
JBoss Tools SVN: r41753 - branches/jbosstools-3.3.x/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-06-06 13:50:33 -0400 (Wed, 06 Jun 2012)
New Revision: 41753
Modified:
branches/jbosstools-3.3.x/build/publish.sh
Log:
replace publish.sh w/ publish/publish.sh
Modified: branches/jbosstools-3.3.x/build/publish.sh
===================================================================
--- branches/jbosstools-3.3.x/build/publish.sh 2012-06-06 17:29:04 UTC (rev 41752)
+++ branches/jbosstools-3.3.x/build/publish.sh 2012-06-06 17:50:33 UTC (rev 41753)
@@ -1,471 +1,2 @@
#!/bin/bash
-# Hudson script used to publish Tycho-built p2 update sites
-# NOTE: sources MUST be checked out into ${WORKSPACE}/sources
-
-# to use timestamp when naming dirs instead of ${BUILD_ID}-H${BUILD_NUMBER}, use:
-# BUILD_ID=2010-08-31_19-16-10; timestamp=$(echo $BUILD_ID | tr -d "_-"); timestamp=${timestamp:0:12}; echo $timestamp; # 201008311916
-
-#set up tmpdir
-tmpdir=`mktemp -d`
-mkdir -p $tmpdir
-
-# where to create the stuff to publish
-STAGINGDIR=${WORKSPACE}/results/${JOB_NAME}
-
-# for trunk, use "trunk" or "trunk/soa" instead of generated path from job name
-PUBLISHPATHSUFFIX=""; if [[ $1 ]]; then PUBLISHPATHSUFFIX="$1"; fi
-
-# https://jira.jboss.org/browse/JBIDE-6956 "jbosstools-3.2.0.M2" is too verbose, use "3.2.0.M2" instead
-JOBNAMEREDUX=${JOB_NAME/.aggregate}; JOBNAMEREDUX=${JOBNAMEREDUX/jbosstools-}
-
-# releases get named differently than snapshots
-if [[ ${RELEASE} == "Yes" ]]; then
- ZIPSUFFIX="${BUILD_ID}-H${BUILD_NUMBER}"
-else
- ZIPSUFFIX="SNAPSHOT"
-fi
-
-# define target update zip filename
-SNAPNAME="${JOB_NAME}-Update-${ZIPSUFFIX}.zip"
-# define target sources zip filename
-SRCSNAME="${JOB_NAME}-Sources-${ZIPSUFFIX}.zip"
-# define suffix to use for additional update sites
-SUFFNAME="-Update-${ZIPSUFFIX}.zip"
-
-# for JBDS, use DESTINATION=/qa/services/http/binaries/RHDS
-if [[ $DESTINATION == "" ]]; then DESTINATION="tools@filemgmt.jboss.org:/downloads_htdocs/tools"; fi
-
-# internal destination mirror, for file:// access (instead of http://)
-if [[ $INTRNALDEST == "" ]]; then INTRNALDEST="/home/hudson/static_build_env/jbds/"; fi
-
-# cleanup from last time
-rm -fr ${WORKSPACE}/results; mkdir -p ${STAGINGDIR}
-
-# check for aggregate zip or overall zip
-z=""
-if [[ -d ${WORKSPACE}/sources/aggregate/site/target ]]; then
- if [[ -f ${WORKSPACE}/sources/aggregate/site/target/site_assembly.zip ]]; then
- siteZip=${WORKSPACE}/sources/aggregate/site/target/site_assembly.zip
- else
- siteZip=${WORKSPACE}/sources/aggregate/site/target/repository.zip
- fi
- z=$siteZip
-elif [[ -d ${WORKSPACE}/sources/aggregate/site/site/target ]]; then
- if [[ -f ${WORKSPACE}/sources/aggregate/site/site/target/site_assembly.zip ]]; then
- siteZip=${WORKSPACE}/sources/aggregate/site/site/target/site_assembly.zip
- else
- siteZip=${WORKSPACE}/sources/aggregate/site/site/target/repository.zip
- fi
- z=$siteZip
-elif [[ -d ${WORKSPACE}/sources/site/target ]]; then
- if [[ -f ${WORKSPACE}/sources/site/target/site_assembly.zip ]]; then
- siteZip=${WORKSPACE}/sources/site/target/site_assembly.zip
- else
- siteZip=${WORKSPACE}/sources/site/target/repository.zip
- # JBIDE-10923
- currentDir=$(pwd)
- cd ${WORKSPACE}/sources/site/target/repository
- zip -r $siteZip .
- cd $currentDir
- fi
- z=$siteZip
-fi
-
-# note the job name, build number, SVN rev, and build ID of the latest snapshot zip
-mkdir -p ${STAGINGDIR}/logs
-bl=${STAGINGDIR}/logs/BUILDLOG.txt
-rm -f ${bl}; wget -q http://hudson.qa.jboss.com/hudson/job/${JOB_NAME}/${BUILD_NUMBER}/console... -O ${bl} --timeout=900 --wait=10 --random-wait --tries=10 --retry-connrefused --no-check-certificate
-
-# JBDS-1361 - fetch XML and then sed it into plain text
-wgetParams="--timeout=900 --wait=10 --random-wait --tries=30 --retry-connrefused --no-check-certificate --server-response"
-rl=${STAGINGDIR}/logs/REVISION
-if [[ $(find ${WORKSPACE} -mindepth 2 -maxdepth 3 -name ".git") ]]; then
- # Track git source revision through hudson api: /job/${JOB_NAME}/${BUILD_NUMBER}/api/xml?xpath=//lastBuiltRevision
- rl=${STAGINGDIR}/logs/GIT_REVISION
- rm -f ${rl}.txt ${rl}.xml; wget -O ${rl}.xml "http://hudson.qa.jboss.com/hudson/job/${JOB_NAME}/${BUILD_NUMBER}/api/xml..." ${wgetParams}
- sed -e "s#<lastBuiltRevision><SHA1>\([a-f0-9]\+\)</SHA1><branch><SHA1>\([a-f0-9]\+\)</SHA1><name>\([^<>]\+\)</name></branch></lastBuiltRevision>#\3\@\1#g" ${rl}.xml | sed -e "s#<[^<>]\+>##g" > ${rl}.txt
-elif [[ $(find ${WORKSPACE} -mindepth 2 -maxdepth 3 -name ".svn") ]]; then
- # Track svn source revision through hudson api: /job/${JOB_NAME}/api/xml?wrapper=changeSet&depth=1&xpath=//build[1]/changeSet/revision
- rl=${STAGINGDIR}/logs/SVN_REVISION
- rm -f ${rl}.txt ${rl}.xml; wget -O ${rl}.xml "http://hudson.qa.jboss.com/hudson/job/${JOB_NAME}/api/xml?wrapper=changeS..." ${wgetParams}
- if [[ $? -eq 0 ]]; then
- sed -e "s#<module>\(http[^<>]\+\)</module><revision>\([0-9]\+\)</revision>#\1\@\2\n#g" ${rl}.xml | sed -e "s#<[^<>]\+>##g" > ${rl}.txt
- else
- echo "UNKNOWN SVN REVISION(S)" > ${rl}.txt
- fi
-else
- # not git or svn... unsupported
- echo "UNKNOWN REVISION(S)" > ${rl}.txt
-fi
-
-METAFILE="${BUILD_ID}-H${BUILD_NUMBER}.txt"
-touch ${STAGINGDIR}/logs/${METAFILE}
-METAFILE=build.properties
-
-echo "JOB_NAME = ${JOB_NAME}" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "BUILD_NUMBER = ${BUILD_NUMBER}" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "BUILD_ID = ${BUILD_ID}" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "WORKSPACE = ${WORKSPACE}" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "HUDSON_SLAVE = $(uname -a)" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "RELEASE = ${RELEASE}" >> ${STAGINGDIR}/logs/${METAFILE}
-echo "ZIPSUFFIX = ${ZIPSUFFIX}" >> ${STAGINGDIR}/logs/${METAFILE}
-y=${STAGINGDIR}/logs/${METAFILE}; for m in $(md5sum ${y}); do if [[ $m != ${y} ]]; then echo $m > ${y}.MD5; fi; done
-
-#echo "$z ..."
-if [[ $z != "" ]] && [[ -f $z ]] ; then
- # unzip into workspace for publishing as unpacked site
- mkdir -p ${STAGINGDIR}/all/repo
- unzip -u -o -q -d ${STAGINGDIR}/all/repo $z
-
- # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
- for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-
- # copy into workspace for access by bucky aggregator (same name every time)
- rsync -aq $z ${STAGINGDIR}/all/${SNAPNAME}
- rsync -aq ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}.MD5
-fi
-z=""
-
-# if component zips exist, copy repository.zip (or site_assembly.zip) too
-for z in $(find ${WORKSPACE}/sources/*/site/target -type f -name "repository.zip" -o -name "site_assembly.zip"); do
- y=${z%%/site/target/*}; y=${y##*/}
- if [[ $y != "aggregate" ]]; then # prevent duplicate nested sites
- #echo "[$y] $z ..."
- # unzip into workspace for publishing as unpacked site
- mkdir -p ${STAGINGDIR}/$y
- unzip -u -o -q -d ${STAGINGDIR}/$y $z
- # copy into workspace for access by bucky aggregator (same name every time)
-
- # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
- for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-
- rsync -aq $z ${STAGINGDIR}/${y}${SUFFNAME}
- rsync -aq ${z}.MD5 ${STAGINGDIR}/${y}${SUFFNAME}.MD5
- fi
-done
-
-# if installer jars exist (should be 2 installers, 2 md5sums)
-for z in $(find ${WORKSPACE}/sources/product/installer/target -type f -name "jbdevstudio-product*-universal*.jar*"); do
- mkdir -p ${STAGINGDIR}/installer/
- rsync -aq $z ${STAGINGDIR}/installer/
-done
-
-# if zips exist produced & renamed by ant script, copy them too
-if [[ ! -f ${STAGINGDIR}/all/${SNAPNAME} ]]; then
- for z in $(find ${WORKSPACE} -maxdepth 5 -mindepth 3 -name "*Update*.zip" | sort | tail -1); do
- #echo "$z ..."
- if [[ -f $z ]]; then
- mkdir -p ${STAGINGDIR}/all
- unzip -u -o -q -d ${STAGINGDIR}/all/ $z
-
- # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
- for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-
- rsync -aq $z ${STAGINGDIR}/all/${SNAPNAME}
- rsync -aq ${z}.MD5 ${STAGINGDIR}/all/${SNAPNAME}.MD5
- fi
- done
-fi
-
-# create sources zip
-pushd ${WORKSPACE}/sources
-mkdir -p ${STAGINGDIR}/all
-if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]] && [[ -d ${WORKSPACE}/sources/aggregate/site/zips ]]; then
- srczipname=${SRCSNAME/-Sources-/-Additional-Sources-}
-else
- srczipname=${SRCSNAME}
-fi
-zip ${STAGINGDIR}/all/${srczipname} -q -r * -x hudson_workspace\* -x documentation\* -x download.jboss.org\* -x requirements\* \
- -x workingset\* -x labs\* -x build\* -x \*test\* -x \*target\* -x \*.class -x \*.svn\* -x \*classes\* -x \*bin\* -x \*.zip \
- -x \*docs\* -x \*reference\* -x \*releng\* -x \*.git\* -x \*/lib/\*.jar
-popd
-z=${STAGINGDIR}/all/${srczipname}; for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-
-mkdir -p ${STAGINGDIR}/logs
-
-# collect component zips from upstream aggregated build jobs
-if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]] && [[ -d ${WORKSPACE}/sources/aggregate/site/zips ]]; then
- mkdir -p ${STAGINGDIR}/components
- for z in $(find ${WORKSPACE}/sources/aggregate/site/zips -name "*Update*.zip"); do
- # generate MD5 sum for zip (file contains only the hash, not the hash + filename)
- for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
- mv $z ${z}.MD5 ${STAGINGDIR}/components
- done
-
- # TODO :: JBIDE-9870 When we have a -Update-Sources- zip, this can be removed
- mkdir -p ${STAGINGDIR}/all/sources
- # unpack component source zips like jbosstools-pi4soa-3.1_trunk-Sources-SNAPSHOT.zip or jbosstools-3.2_trunk.component--ws-Sources-SNAPSHOT.zip
- for z in $(find ${WORKSPACE}/sources/aggregate/site/zips -name "*Sources*.zip"); do
- zn=${z%*-Sources*.zip}; zn=${zn#*--}; zn=${zn##*/}; zn=${zn#jbosstools-};
- # zn=${zn%_trunk}; zn=${zn%_stable_branch};
- mkdir -p ${STAGINGDIR}/all/sources/${zn}/
- unzip -qq -o -d ${STAGINGDIR}/all/sources/${zn}/ $z
- done
- # add component sources into sources zip
- pushd ${STAGINGDIR}/all/sources
- zip ${STAGINGDIR}/all/${SRCSNAME} -q -r * -x hudson_workspace\* -x documentation\* -x download.jboss.org\* -x requirements\* \
- -x workingset\* -x labs\* -x build\* -x \*test\* -x \*target\* -x \*.class -x \*.svn\* -x \*classes\* -x \*bin\* -x \*.zip \
- -x \*docs\* -x \*reference\* -x \*releng\* -x \*.git\* -x \*/lib/\*.jar
- popd
- rm -fr ${STAGINGDIR}/all/sources
- z=${STAGINGDIR}/all/${SRCSNAME}; for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-
- # JBIDE-7444 get aggregate metadata xml properties file
- if [[ -f ${WORKSPACE}/sources/aggregate/site/zips/build.properties.all.xml ]]; then
- rsync -aq ${WORKSPACE}/sources/aggregate/site/zips/build.properties.all.xml ${STAGINGDIR}/logs/
- fi
-fi
-
-# JBIDE-9870 check if there's a sources update site and rename it if found (note, bottests-site/site/sources won't work; use bottests-site/souces)
-for z in $(find ${WORKSPACE}/sources/aggregate/*/sources/target/ -name "repository.zip" -o -name "site_assembly.zip"); do
- echo "Collect sources from update site in $z"
- mv $z ${STAGINGDIR}/all/${SRCSNAME/-Sources-/-Update-Sources-}
- for m in $(md5sum ${z}); do if [[ $m != ${z} ]]; then echo $m > ${z}.MD5; fi; done
-done
-
-# generate list of zips in this job
-METAFILE=zip.list.txt
-echo "ALL_ZIPS = \\" >> ${STAGINGDIR}/logs/${METAFILE}
-for z in $(find ${STAGINGDIR} -name "*Update*.zip") $(find ${STAGINGDIR} -name "*Sources*.zip"); do
- # list zips in staging dir
- echo "${z##${STAGINGDIR}/},\\" >> ${STAGINGDIR}/logs/${METAFILE}
-done
-echo "" >> ${STAGINGDIR}/logs/${METAFILE}
-
-# generate md5sums in a single file
-md5sumsFile=${STAGINGDIR}/logs/md5sums.txt
-echo "# Update Site Zips" > ${md5sumsFile}
-echo "# ----------------" >> ${md5sumsFile}
-md5sum $(find . -name "*Update*.zip" | egrep -v "aggregate-Sources|nightly-Update") >> ${md5sumsFile}
-echo " " >> ${md5sumsFile}
-echo "# Source Zips" >> ${md5sumsFile}
-echo "# -----------" >> ${md5sumsFile}
-md5sum $(find . -name "*Source*.zip" | egrep -v "aggregate-Sources|nightly-Update") >> ${md5sumsFile}
-echo " " >> ${md5sumsFile}
-
-mkdir -p ${STAGINGDIR}/logs
-
-if [[ ! $ANT_HOME ]]; then # find ant in PATH - select LAST entry if more than one
- ANT_HOME=$(for d in $(echo ${PATH//:/ }); do if [[ ${d/ant/} != ${d} ]]; then echo -n " ${d%/bin}"; fi; done); ANT_HOME=${ANT_HOME##* }
-fi
-ANT_EXEC="ant"
-if [[ -d ${ANT_HOME} ]] && [[ -x ${ANT_HOME}/bin/ant ]]; then
- export ANT_HOME=${ANT_HOME}
- ANT_EXEC=${ANT_HOME}/bin/ant
-fi
-ANT_LIB="" # add COMMON_TOOLS folder to ant's lib folder
-if [[ -d /home/hudson/static_build_env/jbds/tools ]]; then
- ANT_LIB=" -lib /home/hudson/static_build_env/jbds/tools"
-fi
-ANT_PARAMS=" -DZIPSUFFIX=${ZIPSUFFIX} -DJOB_NAME=${JOB_NAME} -Dinput.dir=${STAGINGDIR} -Doutput.dir=${STAGINGDIR}/logs -DWORKSPACE=${WORKSPACE}"
-for buildxml in ${WORKSPACE}/build/results/build.xml ${WORKSPACE}/sources/build/results/build.xml ${WORKSPACE}/sources/results/build.xml; do
- if [[ -f ${buildxml} ]]; then
- ANT_SCRIPT=${buildxml}
- RESULTS_DIR=${buildxml/\/build.xml/}
- fi
-done
-ANT_TARGET="buildResults.single"; if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]]; then ANT_TARGET="buildResults.aggregate"; fi
-if [[ ${ANT_SCRIPT} ]] && [[ -f ${ANT_SCRIPT} ]]; then ${ANT_EXEC}${ANT_LIB} -f ${ANT_SCRIPT} ${ANT_TARGET} ${ANT_PARAMS}; fi
-
-# copy buildResults.css, buildResults.html to ${STAGINGDIR}/logs
-if [[ ${RESULTS_DIR} ]] && [[ -d ${RESULTS_DIR} ]]; then
- for f in buildResults.html buildResults.css; do
- if [[ -f ${RESULTS_DIR}/${f} ]]; then rsync -arzq ${RESULTS_DIR}/${f} ${STAGINGDIR}/logs/; fi
- done
-fi
-
-# purge duplicate zip files in logs/zips/all/*.zip
-if [[ -d ${STAGINGDIR}/logs/zips ]]; then rm -f $(find ${STAGINGDIR}/logs/zips -type f -name "*.zip"); fi
-
-# ${bl} is full build log; see above
-mkdir -p ${STAGINGDIR}/logs
-# filter out Maven test failures
-fl=${STAGINGDIR}/logs/FAIL_LOG.txt
-# ignore warning lines and checksum failures
-sed -ne "/\[WARNING\]\|CHECKSUM FAILED/ ! p" ${bl} | sed -ne "/<<< FAI/,+9 p" | sed -e "/AILURE/,+9 s/\(.\+AILURE.\+\)/\n----------\n\n\1/g" > ${fl}
-sed -ne "/\[WARNING\]\|CHECKSUM FAILED/ ! p" ${bl} | sed -ne "/ FAI/ p" | sed -e "/AILURE \[/ s/\(.\+AILURE \[.\+\)/\n----------\n\n\1/g" >> ${fl}
-sed -ne "/\[WARNING\]\|CHECKSUM FAILED/ ! p" ${bl} | sed -ne "/ SKI/ p" | sed -e "/KIPPED \[/ s/\(.\+KIPPED \[.\+\)/\n----------\n\n\1/g" >> ${fl}
-fc=$(sed -ne "/FAI\|LURE/ p" ${fl} | wc -l)
-if [[ $fc != "0" ]]; then
- echo "" >> ${fl}; echo -n "FAI" >> ${fl}; echo -n "LURES FOUND: "$fc >> ${fl};
-fi
-fc=$(sed -ne "/KIPPED/ p" ${fl} | wc -l)
-if [[ $fc != "0" ]]; then
- echo "" >> ${fl}; echo -n "SKI" >> ${fl}; echo -n "PS FOUND: "$fc >> ${fl};
-fi
-el=${STAGINGDIR}/logs/ERRORLOG.txt
-# ignore warning lines and checksum failures
-sed -ne "/\[WARNING\]\|CHECKSUM FAILED/ ! p" ${bl} | sed -ne "/<<< ERR/,+9 p" | sed -e "/RROR/,+9 s/\(.\+RROR.\+\)/\n----------\n\n\1/g" > ${el}
-sed -ne "/\[WARNING\]\|CHECKSUM FAILED/ ! p" ${bl} | sed -ne "/\[ERR/,+2 p" | sed -e "/ROR\] Fai/,+2 s/\(.\+ROR\] Fai.\+\)/\n----------\n\n\1/g" >> ${el}
-ec=$(sed -ne "/ERR\|RROR/ p" ${el} | wc -l)
-if [[ $ec != "0" ]]; then
- echo "" >> ${el}; echo -n "ERR" >> ${el}; echo "ORS FOUND: "$ec >> ${el};
-fi
-
-# publish to download.jboss.org, unless errors found - avoid destroying last-good update site
-if [[ $ec == "0" ]] && [[ $fc == "0" ]]; then
- # publish build dir (including update sites/zips/logs/metadata
- if [[ -d ${STAGINGDIR} ]]; then
-
- # if an aggregate build, put output elsewhere on disk
- if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]]; then
- echo "<meta http-equiv=\"refresh\" content=\"0;url=${BUILD_ID}-H${BUILD_NUMBER}/\">" > $tmpdir/latestBuild.html
- if [[ ${PUBLISHPATHSUFFIX} ]]; then
- date
- # create folders if not already there
- if [[ ${DESTINATION##*@*:*} == "" ]]; then # user@server, do remote op
- seg="."; for d in ${PUBLISHPATHSUFFIX/\// }; do seg=$seg/$d; echo -e "mkdir ${seg:2}" | sftp $DESTINATION/builds/nightly/; done; seg=""
- else
- mkdir -p $DESTINATION/builds/nightly/${PUBLISHPATHSUFFIX}
- fi
- date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/* $DESTINATION/builds/nightly/${PUBLISHPATHSUFFIX}/${BUILD_ID}-H${BUILD_NUMBER}/
- # sftp only works with user@server, not with local $DESTINATIONS, so use rsync to push symlink instead
- # echo -e "rm latest\nln ${BUILD_ID}-H${BUILD_NUMBER} latest" | sftp ${DESTINATIONREDUX}/builds/nightly/${PUBLISHPATHSUFFIX}/
- pushd $tmpdir >/dev/null; ln -s ${BUILD_ID}-H${BUILD_NUMBER} latest; rsync --protocol=28 -l latest ${DESTINATION}/builds/nightly/${PUBLISHPATHSUFFIX}/; rm -f latest; popd >/dev/null
- date; rsync -arzq --protocol=28 --delete $tmpdir/latestBuild.html $DESTINATION/builds/nightly/${PUBLISHPATHSUFFIX}/
- else
- date; rsync -arzq --protocol=28 --delete $tmpdir/latestBuild.html $DESTINATION/builds/nightly/${JOBNAMEREDUX}/
- # sftp only works with user@server, not with local $DESTINATIONS, so use rsync to push symlink instead
- # echo -e "rm latest\nln ${BUILD_ID}-H${BUILD_NUMBER} latest" | sftp ${DESTINATIONREDUX}/builds/nightly/${JOBNAMEREDUX}/
- pushd $tmpdir >/dev/null; ln -s ${BUILD_ID}-H${BUILD_NUMBER} latest; rsync --protocol=28 -l latest ${DESTINATION}/builds/nightly/${JOBNAMEREDUX}/; rm -f latest; popd >/dev/null
- date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/* $DESTINATION/builds/nightly/${JOBNAMEREDUX}/${BUILD_ID}-H${BUILD_NUMBER}/
- fi
- rm -f $tmpdir/latestBuild.html
- #else
- # COMMENTED OUT as this uses too much disk space
- # if a release build, create a named dir
- #if [[ ${RELEASE} == "Yes" ]]; then
- # date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/* $DESTINATION/builds/staging/${JOB_NAME}-${ZIPSUFFIX}/
- #fi
- fi
-
- # and create/replace a snapshot dir w/ static URL
- date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/* $DESTINATION/builds/staging/${JOB_NAME}.next
-
- # 1. To recursively purge contents of .../staging.previous/foobar/ folder:
- # mkdir -p $tmpdir/foobar;
- # rsync -aPrz --delete $tmpdir/foobar tools@filemgmt.jboss.org:/downloads_htdocs/tools/builds/staging.previous/
- # 2. To then remove entire .../staging.previous/foobar/ folder:
- # echo -e "rmdir foobar" | sftp tools@filemgmt.jboss.org:/downloads_htdocs/tools/builds/staging.previous/
- # rmdir $tmpdir/foobar
-
- # JBIDE-8667 move current to previous; move next to current
- if [[ ${DESTINATION##*@*:*} == "" ]]; then # user@server, do remote op
- # create folders if not already there (could be empty)
- echo -e "mkdir ${JOB_NAME}" | sftp $DESTINATION/builds/staging/
- echo -e "mkdir ${JOB_NAME}" | sftp $DESTINATION/builds/staging.previous/
- #echo -e "mkdir ${JOB_NAME}.2" | sftp $DESTINATION/builds/staging.previous/
-
- # IF using .2 folders, purge contents of /builds/staging.previous/${JOB_NAME}.2 and remove empty dir
- # NOTE: comment out next section - should only purge one staging.previous/* folder
- #mkdir -p $tmpdir/${JOB_NAME}.2
- #rsync -arzq --delete --protocol=28 $tmpdir/${JOB_NAME}.2 $DESTINATION/builds/staging.previous/
- #echo -e "rmdir ${JOB_NAME}.2" | sftp $DESTINATION/builds/staging.previous/
- #rmdir $tmpdir/${JOB_NAME}.2
-
- # OR, purge contents of /builds/staging.previous/${JOB_NAME} and remove empty dir
- mkdir -p $tmpdir/${JOB_NAME}
- rsync -arzq --protocol=28 --delete $tmpdir/${JOB_NAME} $DESTINATION/builds/staging.previous/
- echo -e "rmdir ${JOB_NAME}" | sftp $DESTINATION/builds/staging.previous/
- rmdir $tmpdir/${JOB_NAME}
-
- # move contents of /builds/staging.previous/${JOB_NAME} into /builds/staging.previous/${JOB_NAME}.2
- #echo -e "rename ${JOB_NAME} ${JOB_NAME}.2" | sftp $DESTINATION/builds/staging.previous/
-
- # move contents of /builds/staging/${JOB_NAME} into /builds/staging.previous/${JOB_NAME}
- echo -e "rename ${JOB_NAME} ../staging.previous/${JOB_NAME}" | sftp $DESTINATION/builds/staging/
-
- # move contents of /builds/staging/${JOB_NAME}.next into /builds/staging/${JOB_NAME}
- echo -e "rename ${JOB_NAME}.next ${JOB_NAME}" | sftp $DESTINATION/builds/staging/
- else # work locally
- # create folders if not already there (could be empty)
- mkdir -p $DESTINATION/builds/staging/${JOB_NAME}
- mkdir -p $DESTINATION/builds/staging.previous/${JOB_NAME}
- #mkdir -p $DESTINATION/builds/staging.previous/${JOB_NAME}.2
-
- # purge contents of /builds/staging.previous/${JOB_NAME}.2 and remove empty dir
- # NOTE: comment out next section - should only purge one staging.previous/* folder
- #rm -fr $DESTINATION/builds/staging.previous/${JOB_NAME}.2/
-
- # OR, purge contents of /builds/staging.previous/${JOB_NAME} and remove empty dir
- rm -fr $DESTINATION/builds/staging.previous/${JOB_NAME}/
-
- # move contents of /builds/staging.previous/${JOB_NAME} into /builds/staging.previous/${JOB_NAME}.2
- #mv $DESTINATION/builds/staging.previous/${JOB_NAME} $DESTINATION/builds/staging.previous/${JOB_NAME}.2
-
- # move contents of /builds/staging/${JOB_NAME} into /builds/staging.previous/${JOB_NAME}
- mv $DESTINATION/builds/staging/${JOB_NAME} $DESTINATION/builds/staging.previous/${JOB_NAME}
-
- # move contents of /builds/staging/${JOB_NAME}.next into /builds/staging/${JOB_NAME}
- mv $DESTINATION/builds/staging/${JOB_NAME}.next $DESTINATION/builds/staging/${JOB_NAME}
- fi
-
- # generate 2 ${STAGINGDIR}/all/composite*.xml files which will point at:
- # /builds/staging/${JOB_NAME}/all/repo/
- # /builds/staging.previous/${JOB_NAME}/all/repo/
- # /builds/staging.previous/${JOB_NAME}.2/all/repo/
- now=$(date +%s000)
- echo "<?xml version='1.0' encoding='UTF-8'?>
-<?compositeMetadataRepository version='1.0.0'?>
-<repository name='JBoss Tools Staging - ${JOB_NAME} Composite' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>
-" > ${STAGINGDIR}/all/compositeContent.xml
- echo "<?xml version='1.0' encoding='UTF-8'?>
-<?compositeArtifactRepository version='1.0.0'?>
-<repository name='JBoss Tools Staging - ${JOB_NAME} Composite' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'> " > ${STAGINGDIR}/all/compositeArtifacts.xml
- metadata="<properties size='2'><property name='p2.compressed' value='true'/><property name='p2.timestamp' value='"${now}"'/></properties>
-<children size='2'>
-<child location='../../../staging/${JOB_NAME}/all/repo/'/>
-<child location='../../../staging.previous/${JOB_NAME}/all/repo/'/>
-</children>
-</repository>
-"
- echo $metadata >> ${STAGINGDIR}/all/compositeContent.xml
- echo $metadata >> ${STAGINGDIR}/all/compositeArtifacts.xml
- date; rsync -arzq --protocol=28 ${STAGINGDIR}/all/composite*.xml $DESTINATION/builds/staging/${JOB_NAME}/all/
-
- # create a snapshot dir outside Hudson which is file:// accessible
- date; rsync -arzq --delete ${STAGINGDIR}/* $INTRNALDEST/builds/staging/${JOB_NAME}.next
-
- # cycle internal copy of ${JOB_NAME} in staging and staging.previous
- mkdir -p $INTRNALDEST/builds/staging/${JOB_NAME}/
- # purge contents of /builds/staging.previous/${JOB_NAME} and remove empty dir
- rm -fr $INTRNALDEST/builds/staging.previous/${JOB_NAME}/
- # move contents of /builds/staging/${JOB_NAME} into /builds/staging.previous/${JOB_NAME}
- mv $INTRNALDEST/builds/staging/${JOB_NAME} $INTRNALDEST/builds/staging.previous/${JOB_NAME}
- # move contents of /builds/staging/${JOB_NAME}.next into /builds/staging/${JOB_NAME}
- mv $INTRNALDEST/builds/staging/${JOB_NAME}.next $INTRNALDEST/builds/staging/${JOB_NAME}
- fi
-
- # extra publish step for aggregate update sites ONLY
- if [[ ${JOB_NAME/.aggregate} != ${JOB_NAME} ]]; then
- if [[ ${PUBLISHPATHSUFFIX} ]]; then
- # create folders if not already there
- if [[ ${DESTINATION##*@*:*} == "" ]]; then # user@server, do remote op
- seg="."; for d in ${PUBLISHPATHSUFFIX/\// }; do seg=$seg/$d; echo -e "mkdir ${seg:2}" | sftp $DESTINATION/updates/nightly/; done; seg=""
- else
- mkdir -p $DESTINATION/updates/nightly/${PUBLISHPATHSUFFIX}
- fi
- date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/all/repo/* $DESTINATION/updates/nightly/${PUBLISHPATHSUFFIX}/
- else
- date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/all/repo/* $DESTINATION/updates/nightly/${JOBNAMEREDUX}/
- fi
- fi
-fi
-date
-
-# purge org.jboss.tools metadata from local m2 repo (assumes job is configured with -Dmaven.repo.local=${WORKSPACE}/m2-repo)
-if [[ -d ${WORKSPACE}/m2-repo/org/jboss/tools ]]; then
- rm -rf ${WORKSPACE}/m2-repo/org/jboss/tools
-fi
-
-# publish updated log
-bl=${STAGINGDIR}/logs/BUILDLOG.txt
-rm -f ${bl}; wget -q http://hudson.qa.jboss.com/hudson/job/${JOB_NAME}/${BUILD_NUMBER}/console... -O ${bl} --timeout=900 --wait=10 --random-wait --tries=10 --retry-connrefused --no-check-certificate
-date; rsync -arzq --protocol=28 --delete ${STAGINGDIR}/logs $DESTINATION/builds/staging/${JOB_NAME}/
-date; rsync -arzq --delete ${STAGINGDIR}/logs $INTRNALDEST/builds/staging/${JOB_NAME}/
-
-# purge tmpdir
-rm -fr $tmpdir
-
-# to avoid looking for files that are still being synched/nfs-copied, wait a bit before trying to run tests (the next step usually)
-sleep 15s
+./publish/publish.sh
13 years, 4 months
JBoss Tools SVN: r41752 - in trunk/documentation/whatsnew: jmx and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-06-06 13:29:04 -0400 (Wed, 06 Jun 2012)
New Revision: 41752
Modified:
trunk/documentation/whatsnew/as/as-news-3.3.0.CR1.html
trunk/documentation/whatsnew/jmx/jmx-news-1.2.0.CR1.html
Log:
updating mimetype
Modified: trunk/documentation/whatsnew/as/as-news-3.3.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/as/as-news-3.3.0.CR1.html 2012-06-06 17:21:43 UTC (rev 41751)
+++ trunk/documentation/whatsnew/as/as-news-3.3.0.CR1.html 2012-06-06 17:29:04 UTC (rev 41752)
@@ -1,6 +1,11 @@
-<html>
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<head>
<link rel="stylesheet" href="../whatsnew.css">
<title>JBoss AS Tools 3.3.0.CR1 News</title>
<script type="text/javascript">
Modified: trunk/documentation/whatsnew/jmx/jmx-news-1.2.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/jmx/jmx-news-1.2.0.CR1.html 2012-06-06 17:21:43 UTC (rev 41751)
+++ trunk/documentation/whatsnew/jmx/jmx-news-1.2.0.CR1.html 2012-06-06 17:29:04 UTC (rev 41752)
@@ -1,6 +1,11 @@
-<html>
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-<head>
<link rel="stylesheet" href="../whatsnew.css">
<title>JMX Tools 1.2.0.CR1 News</title>
<script type="text/javascript">
13 years, 4 months
JBoss Tools SVN: r41751 - trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-06-06 13:21:43 -0400 (Wed, 06 Jun 2012)
New Revision: 41751
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java
Log:
https://issues.jboss.org/browse/JBIDE-10738 As-you-type EL validation
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java 2012-06-06 17:17:04 UTC (rev 41750)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java 2012-06-06 17:21:43 UTC (rev 41751)
@@ -14,7 +14,6 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
-import java.util.Locale;
import java.util.Map;
import java.util.Set;
@@ -155,23 +154,4 @@
};
job.schedule();
}
-
- static class ValidationMessage extends Message {
-
- private String message;
-
- public ValidationMessage(int severity, String message, IFile file) {
- super(CommonPlugin.PLUGIN_ID, severity, message, null, file);
- this.message = message;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.wst.validation.internal.core.Message#getText(java.util.Locale, java.lang.ClassLoader)
- */
- @Override
- public java.lang.String getText(Locale locale, ClassLoader classLoader) {
- return message;
- }
- }
}
\ No newline at end of file
13 years, 4 months