Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrschmitt2010-04-07 20:50:49 +0000
committerrschmitt2010-04-07 20:50:49 +0000
commit3cdb2265210a3bc11952312d92fca171a9d5fad5 (patch)
tree25861060f93f45d0d28a83cfdee6e335684c3e51 /plugins/org.eclipse.osee.framework.help.ui
parentc3bcc6f58041466411ce81e68501edc81f6a97fc (diff)
downloadorg.eclipse.osee-3cdb2265210a3bc11952312d92fca171a9d5fad5.tar.gz
org.eclipse.osee-3cdb2265210a3bc11952312d92fca171a9d5fad5.tar.xz
org.eclipse.osee-3cdb2265210a3bc11952312d92fca171a9d5fad5.zip
Removed custom ANT tasks for help generation
Diffstat (limited to 'plugins/org.eclipse.osee.framework.help.ui')
-rw-r--r--plugins/org.eclipse.osee.framework.help.ui/.classpath1
-rw-r--r--plugins/org.eclipse.osee.framework.help.ui/build-helper.xml1
-rw-r--r--plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/OSEEWikiImageFetcher.java151
-rw-r--r--plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/OseeGet.java34
-rw-r--r--plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/tasks.properties2
5 files changed, 0 insertions, 189 deletions
diff --git a/plugins/org.eclipse.osee.framework.help.ui/.classpath b/plugins/org.eclipse.osee.framework.help.ui/.classpath
index 8a8f1668cdc..78d5ded0fee 100644
--- a/plugins/org.eclipse.osee.framework.help.ui/.classpath
+++ b/plugins/org.eclipse.osee.framework.help.ui/.classpath
@@ -2,6 +2,5 @@
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/plugins/org.eclipse.osee.framework.help.ui/build-helper.xml b/plugins/org.eclipse.osee.framework.help.ui/build-helper.xml
index 494630f165e..3d5a806c7a1 100644
--- a/plugins/org.eclipse.osee.framework.help.ui/build-helper.xml
+++ b/plugins/org.eclipse.osee.framework.help.ui/build-helper.xml
@@ -26,7 +26,6 @@
<path name="OSEE/Users_Guide/Features" title="Features" />
<path name="OSEE/Users_Guide/Tips" title="Tips" />
<path name="OSEE/Users_Guide/New" title="New" />
- <path name="OSEE/Users_Guide/Update" title="Update" />
<stylesheet url="book.css" />
<pageAppendum>
diff --git a/plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/OSEEWikiImageFetcher.java b/plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/OSEEWikiImageFetcher.java
deleted file mode 100644
index 19528265ccc..00000000000
--- a/plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/OSEEWikiImageFetcher.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Boeing
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- * adapted from org.eclipse.mylyn.help.ui.internal.anttask.MediaWikiImageFetcher.java by David Green
- *******************************************************************************/
-
-package org.eclipse.osee.framework.help.ui.internal.anttask;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.Reader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.taskdefs.Get;
-
-/**
- * Fetch images from a MediaWiki- generated HTML page source
- *
- * @author Ryan Schmitt
- */
-public class OSEEWikiImageFetcher extends Task {
-
- private String base;
-
- private File dest;
-
- private File src;
-
- @Override
- public void execute() throws BuildException {
- if (dest == null) {
- throw new BuildException("Must specify @dest"); //$NON-NLS-1$
- }
- if (!dest.exists()) {
- throw new BuildException("@dest does not exist: " + dest); //$NON-NLS-1$
- }
- if (!dest.isDirectory()) {
- throw new BuildException("@dest is not a directory: " + dest); //$NON-NLS-1$
- }
- if (src == null) {
- throw new BuildException("Must specify @src"); //$NON-NLS-1$
- }
- if (!src.exists()) {
- throw new BuildException("@src does not exist: " + src); //$NON-NLS-1$
- }
- if (!src.isFile()) {
- throw new BuildException("@src is not a file: " + src); //$NON-NLS-1$
- }
- if (base == null) {
- throw new BuildException("Must specify @base"); //$NON-NLS-1$
- }
- if (base.endsWith("/")) { //$NON-NLS-1$
- base = base.substring(0, base.length() - 1);
- }
- Pattern fragmentUrlPattern = Pattern.compile("src=\"([^\"]+)\""); //$NON-NLS-1$
- Pattern imagePattern = Pattern.compile("alt=\"(?:Image:)?([^\"]*)\"([^>]+)", Pattern.MULTILINE); //$NON-NLS-1$
-
- String htmlSrc;
- try {
- htmlSrc = readSrc();
- } catch (IOException e) {
- throw new BuildException("Cannot read src: " + src + ": " + e.getMessage(), e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- log("Parsing " + src, Project.MSG_INFO); //$NON-NLS-1$
- int fileCount = 0;
- Matcher imagePatternMatcher = imagePattern.matcher(htmlSrc);
- while (imagePatternMatcher.find()) {
- String imageFragment = imagePatternMatcher.group(2);
-
- if (imageFragment != null) {
- Matcher fragmentUrlMatcher = fragmentUrlPattern.matcher(imageFragment);
- if (fragmentUrlMatcher.find()) {
- String url = fragmentUrlMatcher.group(1);
- String qualifiedUrl = base + url;
- log("Fetching " + qualifiedUrl, Project.MSG_INFO); //$NON-NLS-1$
- Get get = new Get();
- get.setProject(getProject());
- get.setLocation(getLocation());
- try {
- get.setSrc(new URL(qualifiedUrl));
- } catch (MalformedURLException e) {
- log("Skipping " + url + ": " + e.getMessage(), Project.MSG_WARN); //$NON-NLS-1$ //$NON-NLS-2$
- continue;
- }
-
- String name = url.substring(url.lastIndexOf('/') + 1);
- Matcher m = Pattern.compile("(\\d)+px-(.*)").matcher(name);
- if (m.find()) {
- name = m.group(2);
- }
- get.setDest(new File(dest, name));
- get.execute();
- ++fileCount;
- }
- }
- }
- log("Fetched " + fileCount + " image files for " + src, Project.MSG_INFO); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- public String getBase() {
- return base;
- }
-
- public File getDest() {
- return dest;
- }
-
- public File getSrc() {
- return src;
- }
-
- private String readSrc() throws IOException {
- StringBuilder buf = new StringBuilder((int) src.length());
- Reader reader = new BufferedReader(new FileReader(src));
- try {
- int i;
- while ((i = reader.read()) != -1) {
- buf.append((char) i);
- }
- } finally {
- reader.close();
- }
- return buf.toString();
- }
-
- public void setBase(String base) {
- this.base = base;
- }
-
- public void setDest(File dest) {
- this.dest = dest;
- }
-
- public void setSrc(File src) {
- this.src = src;
- }
-
-}
diff --git a/plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/OseeGet.java b/plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/OseeGet.java
deleted file mode 100644
index 54a4594b14b..00000000000
--- a/plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/OseeGet.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Boeing.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Boeing - initial API and implementation
- *******************************************************************************/
-package org.eclipse.osee.framework.help.ui.internal.anttask;
-
-import java.io.IOException;
-import java.net.URL;
-import java.net.URLConnection;
-import org.apache.tools.ant.taskdefs.Get;
-
-public class OseeGet extends Get {
- @Override
- public void execute() {
- disableCaching();
- super.execute();
- }
-
- private void disableCaching() {
- URLConnection c;
- try {
- c = new URL("http://www.eclipse.org/").openConnection();
- } catch (IOException ex) {
- return;
- }
- c.setDefaultUseCaches(false);
- }
-} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/tasks.properties b/plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/tasks.properties
deleted file mode 100644
index 2462c8c288c..00000000000
--- a/plugins/org.eclipse.osee.framework.help.ui/src/org/eclipse/osee/framework/help/ui/internal/anttask/tasks.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-osee-mediawiki-fetch-images=org.eclipse.osee.framework.help.ui.internal.anttask.OSEEWikiImageFetcher
-osee-get=org.eclipse.osee.framework.help.ui.internal.anttask.OseeGet \ No newline at end of file

Back to the top