How to design extensible software (plugin architecture)? [closed]

IF we’re talking .NET, try Scripting .NET applications with VBScript over on CodeProject. Lots of concrete examples there. Below are sites implementing various application extension techniques ClearScript – Makes V8, VBScript and JScript available to .NET apps CS-Script – The C# Script Engine Plugin Architecture using C# Opinio plugin architecture Notes on the Eclipse Plug-in … Read more

VAADIN cannot find themes when in productionMode

You need to add following goal to your pom.xml, which will compile the .scss files to .css files: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>java</goal> </goals> <configuration> <classpathScope>compile</classpathScope> <mainClass>com.vaadin.sass.SassCompiler</mainClass> <arguments> <argument>src/main/webapp/VAADIN/themes/heijunka/styles.scss</argument> <argument>src/main/webapp/VAADIN/themes/heijunka/styles.css</argument> </arguments> </configuration> </execution> </executions> </plugin> Source: http://dev.vaadin.com/ticket/10291

WPF: Changing Resources (colors) from the App.xaml during runtime

It looks like you’re trying to do some sort of skinning? I’d recommend defining the resources in a Resource Dictionary contained in a separate file. Then in code (App.cs to load a default, then elsewhere to change) you can load the resources as so: //using System.Windows ResourceDictionary dict = new ResourceDictionary(); dict.Source = new Uri(“MyResourceDictionary.xaml”, … Read more

Loading a file relative to the executing jar file

Here is one possible solution using Class.getProtectionDomain(): final Class<?> referenceClass = YourMainClass.class; final URL url = referenceClass.getProtectionDomain().getCodeSource().getLocation(); try{ final File jarPath = new File(url.toURI()).getParentFile(); System.out.println(jarPath); // this is the path you want } catch(final URISyntaxException e){ // etc. } YourMainClass can be replaced by any class in your jar. From the Class.getProtectionDomain() docs: Returns the … Read more

How to use Resources.resx to link images

Here is a trick to access image in Resource file: Accessing image from Resource File in XAML markup First you need to add reference to project properties like this: xmlns:properties=”clr-namespace:MyProject.Properties” And then access it via XAML like this: <image source=”{Binding Source={x:Static properties:Resources.ImageName}}” /> You can use PNG/JPG/BMP as well as ICO file but everyone recommend … Read more

Access ResourceDictionary items programmatically

Got it solved. I needed to: load my resource dictionary merge it with the application’s resources load my control template from the application resource As part of loading the resource dictionary, i also had to register the pack URI scheme. I then had to deal with some crazy COM based exceptions due to slight errors … Read more

Access resx resource files from another project

Resource expressions (<%$ Resources: ClassKey, ResourceKey %>) use ResourceExpressionBuilder class behind the scene. This class can lookup global and local resources only (in website’s App_GlobalResources and App_LocalResources folders). Instead, you can use CodeExpressionBuilder class to access resources from different project. Here’s how to use it. Add CodeExpressionBuilder class to App_Code folder: using System.CodeDom; using System.Web.Compilation; … Read more