Posts

Showing posts with the label enable

Eclipse command framework core expression: Property tester

Image
Addition to Eclipse command framework series, this post explains use of property tester to control command’s enable/visible properties. In earlier post we have tried declarative way to achieve same thing but property tester gives us more control. Property tester is associated with, tester class which implements PropertyTester.java, a namespace and set of property which it supports. We can refer this property tester using its namespace + a property name. It gives you call back to test() method with property name as parameter inside property tester class. We can configure property tester for type of input parameter. Here is sample declaration of property tester extension point < extension point ="org.eclipse.core.expressions.propertyTesters" > < propertyTester class ="com.example.advance.cmd.EditorTester" id ="com.example.advance.cmd.propertyTester1" namespace ="com.example.advance.cm...

Eclipse PDE: Everything about Editor Part 2

Document Partition In this series of “ Eclipse PDE: Everything about Editor ”, this post explains how to configure your document to represent different partition. Document partitions helps to manipulate different part of document in different way. For example there is not need to showing content assist in single line comment or multi line comment. Here I am explaining defining partition for single and multi line comments 1. Define a custom partition scanner Eclipse framework provides Rule based partition scanner, which allows us to define single or multi line rule for partitioning document content. We need to define Custome partition scanner extending org.eclipse.jface.text.rules.RuleBasedPartitionScanner . Override the constructor and define rules for partition . Below code snippets defines rule for single and multi line comments public class MyPartitionScanner extends RuleBasedPartitionScanner { //Define COnstants for supported partition types public static ...

Creating Self-Signed Certificates Open SSL Part 2 : Making Apache HTTP Server SSL enabled.

Image
  In previous post I have explained how to generate self-signed certificates using openSSL. This post We will see how to use this certificate for a secured web application. Now lets use these certificates to make a web application secure. For this I have downloaded Apache HTTP Server including OpenSSL and installed from here. 1. First step is to make Apache HTTP Server SSL enabled. Following the simple steps given below to get SSL enabled Edit <APACHE_INSTALL_HOME>/config/httpd.conf and uncomment following line LoadModule ssl_module modules/mod_ssl.so Include conf/extra/httpd-ssl.conf Edit <APACHE_INSTALL_HOME>/config/extra/httpd-ssl.conf and update following attributes SSLCertificateKeyFile <Location of Server.key file, generated as per previous post> SSLCertificateFile <Location of Server.crt file, generated as per previous post>   2. Restart the Server <APACHE_INSTAL_HOME>/bin/httpd.exe –k restart 3. Install/import certifica...