As you perhaps know, I am getting AsciiDoc toolchain to be used in
Qi4j and integrated into the build system. Neo's build was very messy,
due to the use of Maven. I have opted for doing it directly in Gradle,
and not at all that hard. See the Groovy class;
qi4j-sdk/buildSrc/src/main/groovy/org/qi4j/gradle/plugin/documentation/Documentation.groovy

AsciiDoc documentation is available at;
http://www.methods.co.nz/asciidoc/index.html

./gradlew clean manuals

in the manual/ project will build the documentation. It is required
that asciidoc tool chain to be installed on your OS. See above docs
for that. I will try to make this automatic in the future.

I have started to port the existing content to qi4j-sdk repository. I
want to keep as much content as near the 'logical source' as possible,
but some stuff are heading into manual/ at the moment, but things will
eventually move around. Any content that has source code in it, should
sit in a Gradle project and the source be actual, compilable and
"snipped" into the documentation, to ensure it compiles and evolves
with changes.

Right now, I could use a hand;

  * Images to be pulled in from www.qi4j.org

  * Styling, if someone knows how to get the CSS (possibly XSLT as
well) to look decent.

  * Structure up the "manuals"... I am thinking website, userguide (a
book), recipes (how-to, articles, tutorials), reference (javadoc
initially)

  * More articles and other content.

  * Figure out how to make a better "snippet" system, than Neo has;


The last needs some explanation. Assume a typical source file, with my
"snippet" markers;

/*
 * Copyright (c) 2007, Rickard Öberg. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package org.qi4j.api.property;

import org.qi4j.api.common.AppliesTo;
import org.qi4j.api.common.AppliesToFilter;
import org.qi4j.api.injection.scope.State;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * Generic mixin for properties.
 */
// SNIPPET START: PropertyMixin
@AppliesTo( { PropertyMixin.PropertyFilter.class } )
public final class PropertyMixin
    implements InvocationHandler
{
    @State private StateHolder state;
// SNIPPET PAUSE: PropertyMixin

    public Object invoke( Object proxy, Method method, Object[] args )
        throws Throwable
    {
        return state.propertyFor( method );
    }

    public static class PropertyFilter
        implements AppliesToFilter
    {
        public boolean appliesTo( Method method, Class<?> mixin,
Class<?> compositeType, Class<?> modifierClass )
        {
            return Property.class.isAssignableFrom( method.getReturnType() );
        }
    }
// SNIPPET RESUME: PropertyMixin
}
// SNIPPET START: PropertyMixin


would produce;

@AppliesTo( { PropertyMixin.PropertyFilter.class } )
public final class PropertyMixin
    implements InvocationHandler
{
    @State private StateHolder state;
  :
  :
}


Hope That Helps someone to Help Me. ;-)
-- 
Niclas Hedhman, Software Developer
http://www.qi4j.org - New Energy for Java

I live here; http://tinyurl.com/3xugrbk
I work here; http://tinyurl.com/6a2pl4j
I relax here; http://tinyurl.com/2cgsug

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to