Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Apress committed Oct 13, 2016
0 parents commit 6f0ba76
Show file tree
Hide file tree
Showing 1,422 changed files with 50,425 additions and 0 deletions.
Binary file added 4318.pdf
Binary file not shown.
Binary file added 4319.pdf
Binary file not shown.
Binary file added 9781430218272.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions LICENSE.txt
@@ -0,0 +1,27 @@
Freeware License, some rights reserved

Copyright (c) 2009 Vladimir Silva

Permission is hereby granted, free of charge, to anyone obtaining a copy
of this software and associated documentation files (the "Software"),
to work with the Software within the limits of freeware distribution and fair use.
This includes the rights to use, copy, and modify the Software for personal use.
Users are also allowed and encouraged to submit corrections and modifications
to the Software for the benefit of other users.

It is not allowed to reuse, modify, or redistribute the Software for
commercial use in any way, or for a user�s educational materials such as books
or blog articles without prior permission from the copyright holder.

The above copyright notice and this permission notice need to be included
in all copies or substantial portions of the software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


15 changes: 15 additions & 0 deletions README.md
@@ -0,0 +1,15 @@
#Apress Source Code

This repository accompanies [*Practical Eclipse Rich Client Platform Projects*](http://www.apress.com/9781430218272) by Vladimir Silva (Apress, 2009).

![Cover image](9781430218272.jpg)

Download the files as a zip using the green button, or clone the repository to your machine using Git.

##Releases

Release v1.0 corresponds to the code in the published book, without corrections or updates.

##Contributions

See the file Contributing.md for more information on how you can contribute to this repository.
8 changes: 8 additions & 0 deletions Workspace/README.txt
@@ -0,0 +1,8 @@
INSTALLATION INSTRUCTIONS
-------------------------

1) Unpack the archive to your local disk. For example c:\temp\RCP\Workspace

2) Start Eclipse

3) POint the workspace to c:\temp\RCP\Workspace
7 changes: 7 additions & 0 deletions Workspace/ch01-fragment/.classpath
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>
28 changes: 28 additions & 0 deletions Workspace/ch01-fragment/.project
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ch01-fragment</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
7 changes: 7 additions & 0 deletions Workspace/ch01-fragment/META-INF/MANIFEST.MF
@@ -0,0 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Ch01_fragment Fragment
Bundle-SymbolicName: ch01_fragment
Bundle-Version: 1.0.0
Fragment-Host: org.apache.log4j;bundle-version="1.2.13.v200806030600"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
4 changes: 4 additions & 0 deletions Workspace/ch01-fragment/build.properties
@@ -0,0 +1,4 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
8 changes: 8 additions & 0 deletions Workspace/ch01-fragment/log4j.properties
@@ -0,0 +1,8 @@
# Set root logger level to debug and its only appender to default.
log4j.rootLogger=debug, default
# default is set to be a ConsoleAppender.
log4j.appender.default=org.apache.log4j.ConsoleAppender
# default uses PatternLayout.
log4j.appender.default.layout=org.apache.log4j.PatternLayout
log4j.appender.default.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

7 changes: 7 additions & 0 deletions Workspace/ch01/.classpath
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
28 changes: 28 additions & 0 deletions Workspace/ch01/.project
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ch01</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
16 changes: 16 additions & 0 deletions Workspace/ch01/META-INF/MANIFEST.MF
@@ -0,0 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Ch01 Plug-in
Bundle-SymbolicName: ch01;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: ch01.Activator
Require-Bundle: org.eclipse.core.runtime,
javax.servlet;bundle-version="2.4.0",
org.eclipse.equinox.http.jetty;bundle-version="1.1.0",
org.eclipse.equinox.http.registry;bundle-version="1.0.100",
org.eclipse.equinox.http.servlet;bundle-version="1.0.100",
org.apache.commons.logging;bundle-version="1.0.4",
org.apache.log4j;bundle-version="1.2.13"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .
Binary file added Workspace/ch01/bin/ch01/Activator.class
Binary file not shown.
Binary file added Workspace/ch01/bin/ch01/Servlet1.class
Binary file not shown.
5 changes: 5 additions & 0 deletions Workspace/ch01/build.properties
@@ -0,0 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml
12 changes: 12 additions & 0 deletions Workspace/ch01/plugin.xml
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
point="org.eclipse.equinox.http.registry.servlets">
<servlet
alias="/servlet1"
class="ch01.Servlet1">
</servlet>
</extension>

</plugin>
75 changes: 75 additions & 0 deletions Workspace/ch01/src/ch01/Activator.java
@@ -0,0 +1,75 @@
/*******************************************************************************
* Copyright (c) 2006 Vladimir Silva and others.
* 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:
* Vladimir Silva - initial API and implementation
*******************************************************************************/
package ch01;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.Logger;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;

/**
* The activator class controls the plug-in life cycle
*/
public class Activator extends Plugin
{
// Commons Log
private static final Log log = LogFactory.getLog(Activator.class);

// Log4J Logger
private static final Logger logger = Logger.getLogger(Activator.class);

// The plug-in ID
public static final String PLUGIN_ID = "ch01";

// The shared instance
private static Activator plugin;

/**
* The constructor
*/
public Activator() {
}

/*
* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugins#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;

log.info("Activator Start");
logger.info("Activator Start");
}

/*
* (non-Javadoc)
* @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
plugin = null;
super.stop(context);

log.info("Activator Stop");
logger.info("Activator Stop");
}

/**
* Returns the shared instance
*
* @return the shared instance
*/
public static Activator getDefault() {
return plugin;
}

}
48 changes: 48 additions & 0 deletions Workspace/ch01/src/ch01/Servlet1.java
@@ -0,0 +1,48 @@
/*******************************************************************************
* Copyright (c) 2006 Vladimir Silva and others.
* 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:
* Vladimir Silva - initial API and implementation
*******************************************************************************/

package ch01;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Enumeration;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Servlet1 extends HttpServlet {

private static final long serialVersionUID = 2143882647223456914L;

@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
{
resp.setContentType("text/html");
dumpHttpHeaders(req, resp.getWriter());
}

@SuppressWarnings("unchecked")
private void dumpHttpHeaders(HttpServletRequest req, PrintWriter out)
{
out.println("URI:" + req.getRequestURI() + "<br/>");

Enumeration<String> names = req.getHeaderNames();

while (names.hasMoreElements()) {
final String name = names.nextElement();
out.println(name + "=" + req.getHeader(name) + "<br/>");
}
}

}
8 changes: 8 additions & 0 deletions Workspace/ch02.WebBrowser/.classpath
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<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 exported="true" kind="lib" path="lib/commons-httpclient-3.1.jar" sourcepath="ch02src.zip"/>
<classpathentry kind="output" path="bin"/>
</classpath>
28 changes: 28 additions & 0 deletions Workspace/ch02.WebBrowser/.project
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ch02.WebBrowser</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
10 changes: 10 additions & 0 deletions Workspace/ch02.WebBrowser/CVS/Entries
@@ -0,0 +1,10 @@
/.classpath/1.1/Fri Jul 4 19:21:46 2008//
/.project/1.1/Fri Sep 26 00:49:48 2008//
D/.settings////
D/META-INF////
D/bin////
/build.properties/1.1/Fri Jun 27 22:23:56 2008//
D/icons////
D/lib////
/plugin.xml/1.1/Sat Jul 5 20:48:17 2008//
D/src////
1 change: 1 addition & 0 deletions Workspace/ch02.WebBrowser/CVS/Repository
@@ -0,0 +1 @@
ch02.WebBrowser
1 change: 1 addition & 0 deletions Workspace/ch02.WebBrowser/CVS/Root
@@ -0,0 +1 @@
:pserver:vsilva@localhost:/cvs
1 change: 1 addition & 0 deletions Workspace/ch02.WebBrowser/META-INF/CVS/Entries
@@ -0,0 +1 @@
/MANIFEST.MF/1.1/Fri Jul 4 19:59:11 2008//
1 change: 1 addition & 0 deletions Workspace/ch02.WebBrowser/META-INF/CVS/Repository
@@ -0,0 +1 @@
ch02.WebBrowser/META-INF
1 change: 1 addition & 0 deletions Workspace/ch02.WebBrowser/META-INF/CVS/Root
@@ -0,0 +1 @@
:pserver:vsilva@localhost:/cvs
14 changes: 14 additions & 0 deletions Workspace/ch02.WebBrowser/META-INF/MANIFEST.MF
@@ -0,0 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: WebBrowser Plug-in
Bundle-SymbolicName: ch02.WebBrowser;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: ch02.browser.internal.BrowserActivator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.apache.log4j;bundle-version="1.2.13"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: lib/commons-httpclient-3.1.jar,
.
Export-Package: ch02.browser.perspective
1 change: 1 addition & 0 deletions Workspace/ch02.WebBrowser/bin/CVS/Repository
@@ -0,0 +1 @@
ch02.WebBrowser/bin
1 change: 1 addition & 0 deletions Workspace/ch02.WebBrowser/bin/CVS/Root
@@ -0,0 +1 @@
:pserver:vsilva@localhost:/cvs
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 6 additions & 0 deletions Workspace/ch02.WebBrowser/build.properties
@@ -0,0 +1,6 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
lib/commons-httpclient-3.1.jar
Binary file added Workspace/ch02.WebBrowser/icons/128-earth.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/16-earth.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/16-sconfig.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/16-usearch.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/16x16-browser.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/16x16-flag-us.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/16x16-home.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/16x16-layers.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/16x16-pause.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/16x16-play.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/16x16-saveas.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/16x16-stop.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Workspace/ch02.WebBrowser/icons/32-earth.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6f0ba76

Please sign in to comment.