Title: [waffle-scm] [124] trunk: updated project code style for intellij
Revision
124
Author
mward
Date
2007-05-31 17:41:10 -0500 (Thu, 31 May 2007)

Log Message

updated project code style for intellij

Modified Paths


Diff

Modified: trunk/core/src/main/ruby/waffle.rb (123 => 124)

--- trunk/core/src/main/ruby/waffle.rb	2007-05-31 16:17:11 UTC (rev 123)
+++ trunk/core/src/main/ruby/waffle.rb	2007-05-31 22:41:10 UTC (rev 124)
@@ -2,76 +2,76 @@
 
 module Waffle
 
-    # load/require files
-    class ScriptLoader
-        def ScriptLoader.load_all(prefix, paths)
-            paths.each do |path|
-                # require is what should be used in production ... development should allow for 'load
-                require path.gsub(Regexp.new("^#{prefix}"), 'ruby/')
-            end
-        end
+  # load/require files
+  class ScriptLoader
+    def ScriptLoader.load_all(prefix, paths)
+      paths.each do |path|
+        # require is what should be used in production ... development should allow for 'load
+        require path.gsub(Regexp.new("^#{prefix}"), 'ruby/')
+      end
     end
+  end
 
-    ##
-    # This is a generic class for making HttpServletRequest's, HttpSession's and ServletContext's to act like Hash's
-    class WebContext < Hash
+  ##
+  # This is a generic class for making HttpServletRequest's, HttpSession's and ServletContext's to act like Hash's
+  class WebContext < Hash
 
-        def initialize(context)
-            @__context = context
-            attribute_names = @__context.get_attribute_names
-            
-            while(attribute_names.hasMoreElements)
-                name = attribute_names.nextElement
+    def initialize(context)
+      @__context = context
+      attribute_names = @__context.get_attribute_names
 
-                self[name.to_s] = @__context.get_attribute(name) if name.is_a? Symbol
-                self[name] = @__context.get_attribute(name) unless name.is_a? Symbol
-            end
-        end
+      while (attribute_names.hasMoreElements)
+        name = attribute_names.nextElement
 
-        def []=(key, value)
-            @__context.set_attribute(key.to_s, value) if key.is_a? Symbol
-            @__context.set_attribute(key, value) unless key.is_a? Symbol
-            super
-        end
+        self[name.to_s] = @__context.get_attribute(name) if name.is_a? Symbol
+        self[name] = @__context.get_attribute(name) unless name.is_a? Symbol
+      end
+    end
 
-        def [](key)
-            return super(key.to_s) if key.is_a? Symbol
+    def []=(key, value)
+      @__context.set_attribute(key.to_s, value) if key.is_a? Symbol
+      @__context.set_attribute(key, value) unless key.is_a? Symbol
+      super
+    end
 
-            return super(key)
-        end
+    def [](key)
+      return super(key.to_s) if key.is_a? Symbol
 
-        def method_missing(symbol, *args)
-            @__context.send(symbol, *args)
-        end
+      return super(key)
     end
 
-    module Controller
-        attr_accessor :response # todo the setters for this should be hidden?
-        attr_reader :request, :session
+    def method_missing(symbol, *args)
+      @__context.send(symbol, *args)
+    end
+  end
 
-        def __set_request(request)
-            @request = WebContext.new(request)
-        end
+  module Controller
+    attr_accessor :response # todo the setters for this should be hidden?
+    attr_reader :request, :session
 
-        def __set_session(session)
-            @session = WebContext.new(session)
-        end
+    def __set_request(request)
+      @request = WebContext.new(request)
+    end
 
-        def __pico_container=(pico)
-            @@__pico_container = pico
-        end
+    def __set_session(session)
+      @session = WebContext.new(session)
+    end
 
-        def method_missing(symbol, *args)
-            if symbol.to_s =~ /^find_/ # todo: I don't like "find_" for this ... sounds to model-ish
-                key = symbol.to_s
-                key = key[5..key.length]
-                component = @@__pico_container.getComponentInstance(key)
+    def __pico_container=(pico)
+      @@__pico_container = pico
+    end
 
-                return component unless component.nil?
-            end
+    def method_missing(symbol, *args)
+      if symbol.to_s =~ /^find_/ # todo: I don't like "find_" for this ... sounds to model-ish
+        key = symbol.to_s
+        key = key[5..key.length]
+        component = @@__pico_container.getComponentInstance(key)
 
-            super(symbol, *args)
-        end
+        return component unless component.nil?
+      end
 
+      super(symbol, *args)
     end
+
+  end
 end
\ No newline at end of file

Modified: trunk/core/src/test/java/org/codehaus/waffle/view/XMLViewTest.java (123 => 124)

--- trunk/core/src/test/java/org/codehaus/waffle/view/XMLViewTest.java	2007-05-31 16:17:11 UTC (rev 123)
+++ trunk/core/src/test/java/org/codehaus/waffle/view/XMLViewTest.java	2007-05-31 22:41:10 UTC (rev 124)
@@ -24,13 +24,9 @@
  */
 @RunWith(JMock.class)
 public class XMLViewTest extends MockObjectTestCase {
-
     private Mockery mockery = new Mockery();
-
     private HttpServletRequest mockRequest = mockRequest();
-
     private HttpServletResponse mockResponse = mockResponse();
-
     private MockServletOutputStream mockOutput = new MockServletOutputStream();
 
     @Test

Modified: trunk/waffle.ipr (123 => 124)

--- trunk/waffle.ipr	2007-05-31 16:17:11 UTC (rev 123)
+++ trunk/waffle.ipr	2007-05-31 22:41:10 UTC (rev 124)
@@ -16,8 +16,56 @@
     <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
   </component>
   <component name="CodeStyleSettingsManager">
-    <option name="PER_PROJECT_SETTINGS" />
-    <option name="USE_PER_PROJECT_SETTINGS" value="false" />
+    <option name="PER_PROJECT_SETTINGS">
+      <value>
+        <option name="USE_SAME_INDENTS" value="false" />
+        <option name="JSP_INDENT_OPTIONS">
+          <value>
+            <option name="INDENT_SIZE" value="2" />
+            <option name="CONTINUATION_INDENT_SIZE" value="4" />
+            <option name="TAB_SIZE" value="2" />
+            <option name="USE_TAB_CHARACTER" value="false" />
+            <option name="SMART_TABS" value="false" />
+            <option name="LABEL_INDENT_SIZE" value="0" />
+            <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          </value>
+        </option>
+        <option name="XML_INDENT_OPTIONS">
+          <value>
+            <option name="INDENT_SIZE" value="2" />
+            <option name="CONTINUATION_INDENT_SIZE" value="4" />
+            <option name="TAB_SIZE" value="2" />
+            <option name="USE_TAB_CHARACTER" value="false" />
+            <option name="SMART_TABS" value="false" />
+            <option name="LABEL_INDENT_SIZE" value="0" />
+            <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          </value>
+        </option>
+        <option name="OTHER_INDENT_OPTIONS">
+          <value>
+            <option name="INDENT_SIZE" value="2" />
+            <option name="CONTINUATION_INDENT_SIZE" value="8" />
+            <option name="TAB_SIZE" value="2" />
+            <option name="USE_TAB_CHARACTER" value="false" />
+            <option name="SMART_TABS" value="false" />
+            <option name="LABEL_INDENT_SIZE" value="0" />
+            <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+          </value>
+        </option>
+        <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
+        <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" />
+        <ADDITIONAL_INDENT_OPTIONS fileType="js">
+          <option name="INDENT_SIZE" value="2" />
+          <option name="CONTINUATION_INDENT_SIZE" value="8" />
+          <option name="TAB_SIZE" value="2" />
+          <option name="USE_TAB_CHARACTER" value="false" />
+          <option name="SMART_TABS" value="false" />
+          <option name="LABEL_INDENT_SIZE" value="0" />
+          <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+        </ADDITIONAL_INDENT_OPTIONS>
+      </value>
+    </option>
+    <option name="USE_PER_PROJECT_SETTINGS" value="true" />
   </component>
   <component name="CompilerConfiguration">
     <option name="DEFAULT_COMPILER" value="Javac" />


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to